Skip to content

Releases: Straas/StraaS-web-player-sdk

Changelog on v3.5.13

16 Aug 03:06
Compare
Choose a tag to compare

SDK URL

https://app.straas.net/sdk/3.5.13/player-sdk.js

Bug fix

  1. incognito window
  2. get player info

Changelog on v3.5.12

13 Sep 09:35
Compare
Choose a tag to compare

Changelog on v3.5.11

27 Apr 07:36
Compare
Choose a tag to compare

SDK URL

https://app.straas.net/sdk/3.5.11/player-sdk.js

Bug fix

show "1080p" options at VOD mode

Changelog on v3.5.10

16 Mar 08:23
Compare
Choose a tag to compare

SDK URL

https://app.straas.net/sdk/3.5.10/player-sdk.js

Bug fix

  1. Fix online viewer numbers layout bug
  2. Fix layout problem while title is too long

Features

  1. Provide autoplay : Player.AutoPlay.ANY option
  2. Provide playVideoAnyway function

Changelog on v3.5.9

26 Jan 10:14
Compare
Choose a tag to compare

SDK URL

https://app.straas.net/sdk/3.5.9/player-sdk.js

Features

Hide volume bar on mobile device.

Changelog on v3.5.8

08 Jan 10:12
Compare
Choose a tag to compare

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

01 Apr 09:43
Compare
Choose a tag to compare

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

19 Feb 02:24
Compare
Choose a tag to compare

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

07 Jan 08:23
Compare
Choose a tag to compare

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

01 Oct 01:41
Compare
Choose a tag to compare

SDK URL

https://app.straas.net/sdk/3.3.3/player-sdk.js

Bug Fixes

  1. Fix the issue that the video quality level label didn't update after the video quality level has been changed.
  2. Hide the setup button while watching LIVE on iOS