Closed rajBopche closed 3 years ago
Not an error with the application; the video player on the Youtube website does a good job masking its network traffic such that the application is unable to detect its video stream(s). Site-specific logic would be needed. A greasemonkey userscript would be better suited for that task.
If you feel like a homework assignment..
If you feel like it, you're welcome to port the Youtube userscript from desktop to Android. It wouldn't need any code to modify DOM.. only code to find and forward the video URL.
Kudos to quick response, haven't really worked with greaseMonkey but surely looks interesting.
At the moment, I'm pretty focused on something else.. but at some point I'll circle around to looking at this. It shouldn't be too difficult. I didn't originally bother to port that script since YT's video player has a Chromecast sender already built it.
However, dealing directly with the mp4 video file URL has benefits:
Ended up running Python on Android to extract the actual YT's downloadable url.
After setting up Chaquopy and then importing PyTube on Android all I needed was this line.
py.getModule("pytube").callAttr("YouTube",
"https://www.youtube.com/watch?v=FT6XaOrZhsA").get("streams").asList().get(0).get("url").toString()
Note: Python Object Instantiation on Android was terribly slow. Use threads.
I am able to cast the videos on my TV from abcNews very well. But it does not work for any of the YouTube videos. In fact when the YouTube videos are searched they don't list on the left side drawer in the same manner as abcVideos did?
See how the left drawer contains the video listing available on abcnews site
However in case of YouTube the video listing section is completely empty