Play youtube video in offline mode?

柔情痞子 提交于 2019-12-10 23:43:09

问题


I want to play YouTube video when we redirect from internet area to non internet area.

Like I am having internet access at some point and I played Youtube video, and after some

times my internet connection is loosed, but now I want to play all those video which I played

previously.


回答1:


I am not going to write any code for this but only tell you the route you probably need to take. As with any online media, If you don't have access to the internet, well you can't really get the data. What you need to do is capture the data which is coming in from any media and save it on the device. When the user then clicks on a video which has been previously saved while not connected to the internet, you can play the saved video file. There isn't really a simple quick way to do this, just do some research on saving streaming video or downloading video and saving to device.




回答2:


I am not aware of any caching mechanism for a browser that could do that 'off the box'. This wouldn't make much sense anyway because the cache would get full with only a few videos.

The only way that comes to mind is to download the video of interest while connected and play it with your favorite media player. There's bound to be a few addons depending on the browser you use, I use VideoDownloadHelper for Firefox but for iPhone this blog seems to have some instructions.



来源:https://stackoverflow.com/questions/15590022/play-youtube-video-in-offline-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!