fregante / iphone-inline-video

📱 Make videos playable inline on the iPhone (prevents automatic fullscreen)
https://npm.im/iphone-inline-video
MIT License
2.05k stars 297 forks source link

Subtitle is disappear after display at the same time #54

Closed nhuutri2 closed 8 years ago

nhuutri2 commented 8 years ago

when I add track into video, this not work correctly

fregante commented 8 years ago

Show me the code that you're using or, even better, a demo or the website with the error.

nhuutri2 commented 8 years ago

thanks for reply, i don't have demo on website :(, this is my code,

playvideo(){ var vid = document.getElementById("vid"); vid.src = "file:///Users/binh/Library/Developer/CoreSimulator/Devices/DABD3377-7776-49A0-A541-F46B1CDC30A5/data/Documents/Video/abc.mp4"; makeVideoPlayableInline(vid); vid.play(); },

video width="100%" height="200" id= "vid" controls webkit-playsinline className="playr_video"> <source type="video/mp4" src=abc.mp4" / <track id="entrack" src="abc.srt" kind="subtitles" srcLang="en-us" label="English" type="text/x-srt" default/
</video

the video play ok, but the subtitle have issues, it's disappear too fast, when i try it when use native video the subtitle work fine I don't know how to solve it :(

fregante commented 8 years ago

I tested it here and it seems to work correctly: http://codepen.io/anon/pen/LZxvPL

Without a demo I don't know why it doesn't work for you.