Skip to content

Commit

Permalink
Added missing fix for fullscreen method and removed fullscreen from c…
Browse files Browse the repository at this point in the history
…ontrol bar
  • Loading branch information
Rafael Miranda committed Jul 11, 2017
1 parent 0394f72 commit f0aca29
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 69 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,28 @@ VR View allows you to embed 360 degree VR media into websites on desktop and
mobile. For more information, please read the documentation available at
<http://developers.google.com/cardboard/vrview>.

# Configuration

A complete list of VR View parameters can be found in the table below.

Name | Type | Parameter description
---- | ---- | ---------------------
`video` | String | URL to a 360° video file or an adaptive streaming manifest file (.mpd or .m3u8). Exactly one of video or image is required.
`image` | String | URL to a 360° image file. Exactly one of video or image is required.
`width` | String | String value for the iframe's width attribute.
`height` | String | String value for the iframe's height attribute.
`preview` | String | (Optional) URL to a preview image for a 360° image file.
`is_stereo` | Boolean | (Optional) Indicates whether the content at the image or video URL is stereo or not.
`is_debug` | Boolean | (Optional) When true, turns on debug features like rendering hotspots ad showing the FPS meter.
`is_vr_off` | Boolean | (Optional) When true, disables the VR mode button.
`is_autopan_off` | Boolean | (Optional) When true, disables the autopan introduction on desktop.
`default_yaw` | Number | (Optional) Numeric angle in degrees of the initial heading for the 360° content. By default, the camera points at the center of the underlying image.
`is_yaw_only` | Boolean | (Optional) When true, prevents roll and pitch. This is intended for stereo panoramas.
`loop` | Boolean | (Optional) When false, stops the loop in the video
`hide_button` | Boolean | (Optional) When true, the fullscreen on video are hidden. Useful when user requires to implement his own fullscreen button
`volume` | Number | (Optional) The initial volume of the media; it ranges between 0 and 1; zero equals muted
`muted` | Boolean | (Optional) When true, mutes the sound of the video

# Building

This project uses `browserify` to manage dependencies and build. `watchify` is
Expand Down
7 changes: 0 additions & 7 deletions examples/img/ic_fullscreen_black_off.svg

This file was deleted.

45 changes: 0 additions & 45 deletions examples/img/ic_fullscreen_black_on.svg

This file was deleted.

10 changes: 0 additions & 10 deletions examples/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,6 @@ iframe {
height: 24px;
}

#togglefullscreen {
background: url('img/ic_fullscreen_black_off.svg');
float: right;
height: 20px;
width: 20px;
}
#togglefullscreen.on {
background: url('img/ic_fullscreen_black_on.svg');
}

/* MOBILE */
@media screen and (max-width: 700px) {
iframe {
Expand Down
8 changes: 1 addition & 7 deletions examples/video/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function onLoad() {
video: 'congo_2048.mp4',
is_stereo: true,
loop: false,
hide_button: true
//hide_button: true,
//volume: 0.4,
//muted: true,
//is_debug: true,
Expand All @@ -35,13 +35,11 @@ function onLoad() {

playButton = document.querySelector('#toggleplay');
muteButton = document.querySelector('#togglemute');
fullscreeButton = document.querySelector('#togglefullscreen');
volumeRange = document.querySelector('#volumerange');
timeContainer = document.querySelector('#time');

playButton.addEventListener('click', onTogglePlay);
muteButton.addEventListener('click', onToggleMute);
fullscreeButton.addEventListener('click', onToggleFullscreen);
volumeRange.addEventListener('change', onVolumeChange);
volumeRange.addEventListener('input', onVolumeChange);

Expand Down Expand Up @@ -94,10 +92,6 @@ function onToggleMute() {
vrView.mute(!isMuted);
muteButton.classList.toggle('muted');
}
function onToggleFullscreen() {
vrView.setFullscreen();
fullscreeButton.classList.toggle('on');
}

function onVolumeChange(e) {
vrView.setVolume(volumeRange.value / 100);
Expand Down
1 change: 1 addition & 0 deletions src/embed/iframe-message-receiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ IFrameMessageReceiver.prototype.onMessage_ = function(event) {
case Message.PAUSE:
case Message.SET_CURRENT_TIME:
case Message.GET_POSITION:
case Message.SET_FULLSCREEN:
this.emit(type, data);
break;
default:
Expand Down

0 comments on commit f0aca29

Please sign in to comment.