iframe Embedded Player - Straas/Straas-web-document GitHub Wiki

This section introduces how to use StraaS iframe Embedded Player, it's easy to play three types of StraaS media:Video, Playlist and Live

Usage

Using a embed player is the simplest way to display a StraaS media content in your website. Just do a little adjustment of the embed player in StraaS CMS and then copy & paste the generated embed html code in your html file at the place you want to show the player.

Video

Url format

https://app.straas.net/[account_id]/videos/[video_id]

Embedded html example

<iframe frameborder="0" allowfullscreen="allowfullscreen" width="640" height="360" src="https://app.straas.net/straas-dev/videos/zKhrsFP6?autoplay=1&loop=1"></iframe>

In this example, account_id is straas-dev, video_id is zKhrsFP6.

Attribute src includes two query parameters:autoplay=1 and loop=1, that means player will autoplay the media at the beginning and loop the video after finish playing.

Params

Name Value Meaning Mandatory Note
autoplay [1, 0] If set to 1, video will autoplay no default 0 (false)
loop [1, 0] If set to 1, video will loop no default 0 (false)
muted [1, 0] If set to 1, video will mute no default 0 (false)
views_count [1, 0] If set to 1, player will show views count no default 1 (true)
object_fit [contain, cover] Set object fit mode for video and poster no default contain

Playlist

Url format

https://app.straas.net/[account_id]/playlists/[playlist_id]

Embedded html example

<iframe frameborder="0" allowfullscreen="allowfullscreen" width="940" height="360" src="https://app.straas.net/straas-dev/playlists/v5WchcLs?autoplay=1&loop=1&menu=1"></iframe>

In this example, account_id is straas-dev, playlist_id is v5WchcLs.

Attribute src has a parameter in query: menu=1, which means player will show the playlist menu.

Params

Name Value Meaning Mandatory Note
autoplay [1, 0] If set to 1, playlist will autoplay no default 0 (false)
loop [1, 0] If set to 1, playlist will loop no default 0 (false)
muted [1, 0] If set to 1, video will mute no default 0 (false)
menu [1, 0] If set to 1, it will show playlist menu no default 1 (true)
object_fit [contain, cover] Set object fit mode for video and poster no default contain

Live

Url format

https://app.straas.net/[account_id]/lives/[live_id]

Embedded html example

<iframe frameborder="0" allowfullscreen="allowfullscreen" width="940" height="360" src="https://app.straas.net/straas-dev/lives/v5WabcLs?autoplay=1"></iframe>

In this example, account_id is straas-dev, live_id is v5WchcLs.

Attribute src has a parameter in query: autoplay=1, which means player will autoplay the live content page is load.

Params

Name Value Meaning Mandatory Note
autoplay [1, 0] If set to 1, live will autoplay no default 0 (false)
muted [1, 0] If set to 1, video will mute no default 0 (false)
views_count [1, 0] If set to 1, player will show content views count no default 1 (true)
users_count [1, 0] If set to 1, player will show current online users count no default 1 (true)
object_fit [contain, cover] Set object fit mode for video and poster no default contain

Localization

StraaS player will automatically detect browser's language settings and display UI content in corresponding languages. If you need more advanced language setting, please refer our Player SDK.

Language codes

Now StraaS player supports the following languages, other languages which are not listed will make player language fallback to English.

Code Language
en English
zh-tw Chinese (Taiwan)
ja Japanese
⚠️ **GitHub.com Fallback** ⚠️