Opera TV support play video in full screen?

Forums » Dev.Opera » Opera TV Content Development Discussions

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

7. August 2012, 10:03:41

hungnm4

Posts: 6

Opera TV support play video in full screen?

When I play a video, it's only displayed 1/4 of tv's screen (my videos have format 480p, 1080p) but the control bar is displayed in full screen. Does Opera support play video in full screen? and how can i do it?

7. August 2012, 14:46:32

meteorites

Posts: 43

Hi,

Fullscreen video is supported but the problem you described is known, valid problem at some devices. It should be fixed soon in one of the next firmware upgrades. We recommend for now to not use fullscreen video until it is fixed.

8. August 2012, 02:29:23

hungnm4

Posts: 6

Originally posted by meteorites:

Hi,

Fullscreen video is supported but the problem you described is known, valid problem at some devices. It should be fixed soon in one of the next firmware upgrades. We recommend for now to not use fullscreen video until it is fixed.



So are there any way to solve this problem? If we try to fix the width and height of playing window, is it Ok? (we use 1920x1080, video display in fullscreen but not fix, it have 2 scrollbar at left and bottom of tv's screen). I use some video apps in Opera Store such as "Sunset screensaver", the video play in fullscreen. We added some code but it not effect.


if(typeof(window.screen.width) === "number" && window.screen.width !== 1280) {

var toRescale = [
video
];

for(var i = 0; i < toRescale.length; ++i) {
toRescale.style.width = window.screen.width + "px";
toRescale.style.height = window.screen.height + "px";
}
}

8. August 2012, 04:33:17

microvnn

Posts: 1

When video object is playing video solutions (480p, 720p with other size), video'll auto crop and video don't scale in video object. i don't control it...
How to fixed problem or the solution.

Please help me.

21. August 2012, 09:48:13

meteorites

Posts: 43

For video size problem where it is shown at ¼ of the screen some devices with TV Store indeed have problems with scaling it correctly. Device manufacturers are working on fixing it already. You can use following JavaScript as a workaround to check window size and according that value you can resize element with video.

Your code in JavaScript could looks like this:

if(typeof(window.screen.width) === "number") {
videoElement.style.width = window.screen.width + "px";
videoElement.style.height = window.screen.height + "px";
}

In case you would have problems with visible scrollbars please use overflow: hidden in CSS for body element. Additionally you can set padding and margin to 0. Your CSS code should look like this:

body {
background: #000;
padding: 0;
margin:0;
width:100%; height:100%;
overflow:hidden;
}

I hope that helps.

22. August 2012, 03:07:02

hungnm4

Posts: 6

Originally posted by meteorites:


Your code in JavaScript could looks like this:

if(typeof(window.screen.width) === "number") {
videoElement.style.width = window.screen.width + "px";
videoElement.style.height = window.screen.height + "px";
}

In case you would have problems with visible scrollbars please use overflow: hidden in CSS for body element. Additionally you can set padding and margin to 0. Your CSS code should look like this:

body {
background: #000;
padding: 0;
margin:0;
width:100%; height:100%;
overflow:hidden;
}



Thanks for your help. I used this way in our app but there are a problem. Although the video was displayed in fullscreen but is was not displayed as original source. It was crop a part of video's screen. For example: with 16:9 video, it was cropped about 1/8 on the top; with 4:3 video, it was crop 1/6 on the left. Have you ever seen this case?

22. August 2012, 11:59:17

meteorites

Posts: 43

We didn't notice such problem. Did you see similar effect with web page (not whole 1280x720 area is visible)? If so it may be overscan effect that occurs rarely at some specific devices. It is described here: http://dev.opera.com/articles/view/design-considerations-for-opera-tv-store-applications/#resolution_overscan
with solution to ensure your content will fit into 1216×684px area since it shouldn't be cropped due to overscan.


22. August 2012, 19:12:31

meteorites

Posts: 43

Can you try to use window.innerHeight and window.innerWidth instead of screen.height and screen.width?

28. August 2012, 06:31:15

Opera Software

tagawa

Posts: 143

Using window.innerHeight and window.innerWidth instead of window.screen.height and window.screen.width seemed to work for me.

29. August 2012, 10:50:52

meteorites

Posts: 43

Hi,

Looks like devices with Opera TV Store received fix for this issue so this workaround shouldn't be necessary anymore. Please update firmware in your devices.

29. August 2012, 11:04:45

hungnm4

Posts: 6

Originally posted by meteorites:

Hi,

Looks like devices with Opera TV Store received fix for this issue so this workaround shouldn't be necessary anymore. Please update firmware in your devices.



Hi meteorites,

Thanks for your support. I saw this change last week. I solved the problem with auto scale video in my app.

Forums » Dev.Opera » Opera TV Content Development Discussions