Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Cloud Video
    • Overview
    • Control
    • Troubleshooting
      • Overview
      • IFrame
      • iOS
        • Getting started
        • Player initialization parameters
        • Player methods
        • Player state
        • Player events
  • Access management
  • Pricing policy
  • Audit Trails events
  • Release notes
  1. Video Player
  2. SDK
  3. JavaScript
  4. Player initialization parameters

Player initialization parameters

Written by
Yandex Cloud
Updated at October 28, 2024

You can provide initial parameters to Cloud Video Player when initializing it.

elementelement

Embed element. This is a required parameter. This can be either a pointer to a certain HTMLElement or an ID selector.

Player creation examples:

  • By providing a pointer:

    var element = document.getElementById('video-player');
    var player = Ya.playerSdk.init({ element, ...});
    
  • By providing an ID selector:

    var player = Ya.playerSdk.init({ element: 'video-player', ...});
    

sourcesource

Playable content link.

Player creation examples:

var player = Ya.playerSdk.init({ ..., source: 'https://runtime.video.cloud.yandex.net/player/...', ...});

Where https://runtime.video.cloud.yandex.net/player/... is a link to playable content, e.g., https://runtime.video.cloud.yandex.net/player/video/vplvmyqsxi7dlwndvb4y. For more information, see Getting an embed code or link to a video and Getting an embed code or link to a broadcast.

autoplayautoplay

Autoplay when loading content.

In some cases, autoplay may fail.

Autoplay is disabled by default.

Player creation examples with disabled autoplay:

var player = Ya.playerSdk.init({ ..., autoplay: false, ...});

mutedmuted

muted status when creating a player. true to disable sound, false to enable sound.

If the sound is on, autoplay may fail.

Player creation examples with enabled sound:

var player = Ya.playerSdk.init({ ..., muted: false, ...});

volumevolume

Volume level of a video from 0 (muted) to 1 (maximum volume).

The default value is 1.

Player creation example with the 0.5 volume:

var player = Ya.playerSdk.init({ ..., volume: 0.5, ...});

startPositionstartPosition

Starting position of content playback when loading (in seconds).

The default values are:

  • For the VOD video type: Beginning of the video (zero second).
  • For the LIVE and EVENT video types: Live.

Player creation example with the 10 starting position:

var player = Ya.playerSdk.init({ ..., startPosition: 10, ...});

hiddenControlshiddenControls

Using hiddenControls, you can hide the player interface elements.

All the controls are shown by default.

As a value, you can provide either an array of interface elements to hide or a string listing such elements separated by commas.

Examples:

  • Hide the play/pause and settings buttons by providing hiddenControls as a string:

    var player = Ya.playerSdk.init({ ..., hiddenControls: 'play,settings', ...});
    
  • Hide the play/pause and settings buttons by providing hiddenControls as an array:

    var player = Ya.playerSdk.init({ ..., hiddenControls: ['play','settings'], ...});
    
  • You can hide all interface elements using the * meta element:

    var player = Ya.playerSdk.init({ ..., hiddenControls: '*', ...});
    
  • You can hide all interface elements except a specific one using the ! operator. For example, the following code will hide all controls except the play/pause button:

    var player = Ya.playerSdk.init({ ..., hiddenControls: '*,!play', ...});
    

Interface elements you can hide:

  • *: All interface elements.
  • play: Interface element displaying the Play, Pause, and Repeat buttons. It turns off play or pause when clicking the player.
  • contextMenu: Context menu.
  • fullscreen: Full screen toggle button.
  • live: Go back to live button.
  • mobileSeekButtons: Rewind and fast forward buttons in the mobile interface.
  • nextAdInfo: Time until the next ad.
  • playbackRate: Playback rate.
  • poster: Poster.
  • preloader: Loading spinner.
  • settings: Settings button.
  • startScreen: Start screen.
  • startScreenPlay: Play button on the start screen.
  • subtitlesToggle: Button to toggle subtitles.
  • timeline: Timeline. It turns off rewinding and fast forwarding from the keyboard or by touching the sensor screen.
  • timelinePreview: Preview on the timeline.
  • time: Current playback time.
  • title: Video title.
  • sound: Mute button.
  • volumeSlider: Volume slider.

See alsoSee also

  • Interface: PlayerSdkInitConfig API reference
  • Interface: PlayerSdkSourceParams API reference

Was the article helpful?

Previous
Getting started
Next
Player methods
© 2025 Direct Cursus Technology L.L.C.