Releases: Straas/StraaS-web-player-sdk
Changelog on v3.5.13
Changelog on v3.5.12
Changelog on v3.5.11
Changelog on v3.5.10
SDK URL
https://app.straas.net/sdk/3.5.10/player-sdk.js
Bug fix
- Fix online viewer numbers layout bug
- Fix layout problem while title is too long
Features
- Provide
autoplay : Player.AutoPlay.ANY
option - Provide playVideoAnyway function
Changelog on v3.5.9
Changelog on v3.5.8
SDK URL
https://app.straas.net/sdk/3.5.8/player-sdk.js
Bug Fixes
On iOS 14, Volume is mute and can't be adjusted.
Changelog on v3.5.0
SDK URL
https://app.straas.net/sdk/3.5.0/player-sdk.js
Features
This version provides full support for player UI customization, check out the following repository and its demo page to learn how it works:
Demo Repository:
https://github.com/StraaS/web-player-ui-customization-example
Demo Pages:
https://straas.github.io/web-player-ui-customization-example/index.html
Changelog on v3.4.1
SDK URL
https://app.straas.net/sdk/3.4.1/player-sdk.js
Improvements
The player now shows the proper error message and triggers the "onError" event when encountering network-related errors.
For example, if the backend server responses the HTTP error with status code "429", it will prompt the end-user to try again later for overloading of the server right now.
The schema of the parameter of the "onError" event passed to the player constructor has the following form:
{
"target": <object> "The player instance triggering the event"
"data": {
"code": <number> Reference: https://developer.mozilla.org/en-US/docs/Web/API/MediaError
"straasErrorCode": <string> "The constant string code represents the error state"
"message": <string> "The default user-friendly error message"
}
}
Example:
async function initPlayer() {
const response = await window.fetch('https://demo.straas.net/api/apptoken')
if (!response.ok) {
throw new Error('Get app token failed')
}
const data = await response.json()
window['StraaSOnInit'] = function () {
const StraaS = window.StraaS
const Player = StraaS.Player
const playerInstance = new Player('#player', {
type: Player.Type.VIDEO,
id: 'iqFDrEw7',
accountId: 'demo.straas.io-test',
appToken: data.token,
events: {
onError: function playerError(e) {
if ( e.data.straasErrorCode === "CMS_API_REQUEST_TOO_MANY_REQUESTS" ) {
// do something like retry
}
}
}
})
}
}
initPlayer()
Changelog on v3.4.0
SDK URL
https://app.straas.net/sdk/3.4.0/player-sdk.js
New Features
By providing the videoTitle
constructor option for setting the video tag's title attribute, the title will show on the lock screen of iOS platform. For Android platform, the top domain's title will be used on the lock screen.
Example:
async function initPlayer() {
const response = await window.fetch('https://demo.straas.net/api/apptoken')
if (!response.ok) {
throw new Error('Get app token failed')
}
const data = await response.json()
window['StraaSOnInit'] = function () {
const StraaS = window.StraaS
const Player = StraaS.Player
const playerInstance = new Player('#player', {
type: Player.Type.VIDEO,
id: 'iqFDrEw7',
accountId: 'demo.straas.io-test',
appToken: data.token,
videoTitle: "Hello World!"
})
}
}
initPlayer()
Bug Fixes
There is a bug since version 3.2.4, the iOS platform can't watch DVR playback after the live stopped, this bug is fixed in this release.
Changelog on v3.3.3
SDK URL
https://app.straas.net/sdk/3.3.3/player-sdk.js
Bug Fixes
- Fix the issue that the video quality level label didn't update after the video quality level has been changed.
- Hide the setup button while watching LIVE on iOS