kamranahmedse / pennywise

Cross-platform application to open any website or media in a floating window
MIT License
3.77k stars 207 forks source link

Rewrite the t parameter when embedding YouTube videos #139

Closed ObeA closed 4 years ago

ObeA commented 4 years ago

What does this PR do? YouTube uses the t parameter to start the video at an offset. For example, this happens when copying a YouTube URL of a video you already watched partially. However, for embedded videos YouTube uses the start and end parameters to 'cut' the video (source). Currently this offset will be lost when rewriting the URL to an embedded video.

This PR will rewrite the t parameter to start, making sure the embedded video continues at the point specified by the original URL. The s suffix needs to be removed for this.

What platforms did you test it on? Linux 5.4.40-1-MANJARO x86_64