Resource icon

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

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)

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
  • Like
Reactions: nacurutu
Author
BigG
Downloads
2,017
Views
6,245
First release
Last update
Rating
0.00 star(s) 0 ratings
Top