Samsung / cordova-plugin-toast

Cordova plugin that provides TV Specific functionalities.
Apache License 2.0
122 stars 60 forks source link

Video player not visible on samsung tv (tizen )and emulator #91

Closed ZHAJOR closed 5 years ago

ZHAJOR commented 5 years ago

Hi, I'm developing an app and right now I'm facing a weird scenario. I can play a video, navigate and everything is working fine on the TV Web Simulator. Then I install the wgt (it's been signed) on the emulator and the app is working, I can navigate and everything, but when I launch a video I have the sound but not the video. So I'm guessing the player has been initialized but has a 0/0 width height. One other thing, I'm not having the DURATION event on the emulator. The video I'm trying to load is a basic m3u8 manifest.

I also tried on a real samsung TV and I have the same issue as the emulator.

Do you have an idea of what's happening?

By the way impossible to debug the app, tizen studio is having an issue each time, I can only install an app using the cli.

ZHAJOR commented 5 years ago

It's working now.

Solution: Start over the player code by copy pasting the sample media code. And I really mean copy/pasting. I'm still unable to tell what really is different, surely something linked to the way I was using to manage the HTML containers.

If you are reading this issue and either your player doesn't show (and you have sound), or your player shows but you don't have the Duration Event => start again from scratch, don't waste time trying to debug, it's just 50 lines of code.

Closing the issue.

ZHAJOR commented 5 years ago

The real issue was that during the initialization of the player toast is getting the size of the parent element. I was using vuejs and in my case the size was 0, then the page was loading and this value was updated to the full screen (let's say 1920x1080), BUT the player initialized by toast was still 0.

There is a code in the toast framework that should catch the size update of my element and update the player itself, but it wasn't trigger. I was able to trigger it from the web simulator by just clicking.

To fix it you can:

pwsses commented 5 years ago

Hi Sorry to late reply. As you say, Tizen avplay has issue. which occurs when set width or height to 0. Toast control when all of video rect size is 0. but only width/height is 0 , like your case, it is hole.

It is not a standard, I recommend set width or height to 1. I will check solution update TOAST or Tizen Platform.

Thank you.