weizhenye / ASS

A lightweight JavaScript ASS subtitle renderer
https://ass.js.org
MIT License
523 stars 79 forks source link

Mobile is not supported? #2

Closed xwlcn closed 7 years ago

xwlcn commented 7 years ago

Mobile is not supported ?

weizhenye commented 7 years ago

Basic features should works fine. Some advanced features like \clip may not work. Not tested with much mobile browsers, but Chrome for mobile is just consistent with Chrome.

xwlcn commented 7 years ago

I use mobile UC browser, it doesn't work with fullscreen.

weizhenye commented 7 years ago

For most browsers, click fullscreen button in <video> element will only maximize video itself, the <div> to show subtitles is not fullscreened.

Generally native controls may not used in production, if you are using some library like video.js, its fullscreen button will maximize the wrapper <div>, which including <video>, the custom controls and some other <div>s. Subtitles can also be put in the wrapper <div>, then being fullscreened together.

xwlcn commented 7 years ago

yes, I used plyr.js, it aways auto resize the video's size when the html page loaded, and I called ass.resize() when the video enter fullscreen and exit fullscreen, it works well on PC, but mobile doesn't work. you can see this page: http://bd-dy.com/play/8909-0.htm on android mobile. Can you write an example with plyr.js?

weizhenye commented 7 years ago

I did some simple tests with UC browser and found that when clicking the fullscreen button, it seems OK, but once played the video, the controls of plyr.js was replaced by UC native controls.

That means plyr.js itself doesn't support UC browser, exactly, UC browser doesn't allow third library to control video when fullscreen.

So, maybe there are no way to support UC browser.

xwlcn commented 7 years ago

Thanks for your anwser.