Browser Source: Load YouTube or Vimeo using the embedded player 2021-05-10

Owen C137

Administrator
Staff
Owen C137 Rep
1
0
0
Rep
1
Owen C137 Vouches
1
0
0
Vouches
1
Posts
169
Likes
65
4 YEARS
4 YEARS OF SERVICE
LEVEL 4 165 XP
I experimented with using the YouTube and Vimeo embedded players with key parameters that I needed, using the OBS browser source and the "url" field;
1. To autostart when made visible
2. To loop the video
3. To start the video after n seconds (YouTube only)

Download: https://obsproject.com/forum/resour...vimeo-using-the-embedded-player.1282/download

The script allows you to select
  • The service: YouTube or Vimeo, defaults to YT
  • The browser source that the video will play in: the script creates a dropdown list of available browser sources
  • Video ID to be played: This can be found in the url of the video
  • - YouTube: https://www.youtube.com/watch?v=VIDEO_ID
  • - Vimeo: https://vimeo.com/VIDEO_ID
  • Video IDs for 2nd, 3rd ... videos (YouTube only): A comma-separated list of VIDEO_IDs that will follow on from the first ID
  • Autostart: Checked=true, default=false
  • Loop: Checked=true, default=false. For YT with multiple videos it will loop after all the videos are completed
  • Start (YouTube only): The start time, in seconds where the video will start (first video only)
After populating the required fields the script populates the "url" field of the selected browser source. When the source is activated the video will play automatically if autostart is checked.
To use the script with more than one browser source/video, duplicate the script, video1.lua, video2.lua etc
 

110

512

618

15

Top