Languages

Menu
Sites
Language
Video tag enter full screen

TIP Tizen launches web applications on the WebKit browser. There are dedicated methods available to launch video playback in the fullscreen mode: videoDOMElement.webkitEnterFullscreen(); To exit the fullscreen mode developer, should use: document.webkitCancelFullScreen();

But webkitEnterFullscreen does not enter full screen.

Is there additional settings/configs which should be done?

document.webkitCancelFullScreen() exits full screen without any issues

Edited by: Maksym on 12 Dec, 2013

Responses

6 Replies
konduri sai swathi

Hi,

Try the below code.

HTML :

<video src="sampleVideo.mp4" id="videosample"></video>
<button onclick="fullscreen();">Enter Fullscreen</button>

JavaScript :

function fullscreen(){
    console.log("fullscreen");
	$('#videosample').get(0).play();        
	$('#videosample').get(0).webkitEnterFullscreen();
}

 

Maksym

It looks strange, but if I run

$('#videosample').get(0).webkitEnterFullscreen();

from Web inspector -> Console I get

Error: InvalidStateError: DOM Exception 11
  1. code: 11

  2. constructor: DOMExceptionConstructor

  3. line: 2

  4. message: "InvalidStateError: DOM Exception 11"

  5. name: "InvalidStateError"

  6. stack: "webkitEnterFullscreen@[native code]↵eval code↵eval@[native code]↵_evaluateOn↵_evaluateAndWrap↵evaluate↵[native code]"

  7. __proto__: DOMExceptionPrototype

Also still cannot get full screen for my element which I create dinamically. Nut I can exit full screen

Andrew Richeson

n ice sharing it help me to find out. where i mistake in the programe

Maksym

Where?
 

Maksym

Where is your mistake and solution?