Concept Posted April 7, 2014 Share Posted April 7, 2014 Hey all! I've created a new Workflow controlling Youtube Videos on Google Chrome! I use this mainly for listening to music, but it will work for anything! You can find the details here: http://www.packal.org/workflow/youtube-control I have not tested it with any other version other than Mavericks, so some help with testing would be appreciated! Again its only tested witht he latest Google Chrome. Additionally, this works best with HTML5 video which you can change here https://www.youtube.com/html5 It may break if Youtube updates their layout! Thanks, Phil krasimir.vanev 1 Link to comment
krasimir.vanev Posted October 27, 2014 Share Posted October 27, 2014 Thank you very much! Works great for me. Link to comment
Yuri Posted March 22, 2017 Share Posted March 22, 2017 The Same for Safari tell application "Safari" repeat with t in tabs of windows tell t if URL starts with "http://www.youtube.com/watch" or URL starts with "https://www.youtube.com/watch" then do JavaScript " var player = document.getElementById('movie_player') || document.getElementsByTagName('embed')[0]; if (player) { if (player.getPlayerState() === 1) { player.pauseVideo(); } else { player.playVideo(); } } " exit repeat end if end tell end repeat end tell Link to comment
Yuri Posted July 22, 2017 Share Posted July 22, 2017 Youtube-control workflow, which I've adapted for Safari. https://yadi.sk/d/-cKlFS2U3LH3Cd ytn — youtube next ytp — youtube previous yts — youtube start/stop Based on https://gist.github.com/zachloubier/9b07fd21292a7dfb92d9 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now