Initialization Configuration
As of 2023, Samsung states that Tizen TV's are not optimized for .NET applications. Samsung strongly recommends using JS/Web applications instead of C#/.NET applications for TVs. Please check the Lura Player Web SDK
During initialization, parameters such as autoplay, muted, volume, and loop attributes can be configured. However, it is also possible to modify the volume and muted attributes at a later time, as per requirements.
Media Initialization Configuration
The initialization configuration can set preferred video, caption, and audio behavior when playback starts.
These preferences are applied on supported platforms.
| Attribute | Type | Description |
|---|---|---|
| video | object | Initial ABR, bitrate, and latency settings. |
| caption | object | Initial caption display, language, and source settings. |
| audio | object | Initial audio language settings. |
using Lura;
using Lura.Unified;
using Tizen.NUI;
Window window = Window.Instance;
var player = new Player(window);
var config = new Configuration
{
Initialization = new InitializationConfiguration
{
Video = new VideoInitializationConfiguration
{
AbrEnabled = true,
PreferredBitrate = 1000000,
LatencyMode = LatencyModes.Default
},
Caption = new CaptionInitializationConfiguration
{
Enabled = true,
PreferredLanguage = "en",
Source = new[] { "manifest", "embedded" }
},
Audio = new AudioInitializationConfiguration
{
PreferredLanguage = "en"
}
}
};
await player.SetConfig(config);
player.Play();
| Attribute | Type | Description |
|---|---|---|
initialization.video.abrEnabled | bool | Enables or disables ABR on supported platforms. |
initialization.video.preferredBitrate | long | Preferred starting bitrate on supported platforms. |
initialization.video.latencyMode | LatencyMode | Preferred latency mode on initialization. |
initialization.caption.enabled | bool | Shows or hides captions on initialization. |
initialization.caption.preferredLanguage | string | Preferred caption language on supported platforms. |
initialization.caption.source | string[] | Caption sources to use. Defaults to ["manifest", "embedded"]. |
initialization.audio.preferredLanguage | string | Preferred audio language on supported platforms. |
Autoplay Configuration
The implementation of autoplay attribute can be done in Lura Player using the following configuration.
| Attribute | Type | Description |
|---|---|---|
| autoplay | bool | Autoplay attribute of the player. Defaults to false |
using Lura;
using Lura.Unified;
using Tizen.NUI;
// Initialize player
Window window = Window.Instance;
var player = new Player(window);
// Configure with autoplay enabled
var config = new Configuration
{
Controls = new ControlsConfiguration
{
Autoplay = true
}
};
// Set configuration
await player.SetConfig(config);
player.Play();
Mute Configuration
The implementation of initially muted attribute can be done in Lura Player using the following configuration.
| Attribute | Type | Description |
|---|---|---|
| muted | bool | Whether to start muted when the player autoplays. Defaults to false. |
Some platforms doesn't support unmuted autoplay. So if autoplay attribute is set to true, muted attribute will be overwritten to true in platforms that doesn't support unmuted autoplay.
using Lura;
using Lura.Unified;
using Tizen.NUI;
// Initialize player
Window window = Window.Instance;
var player = new Player(window);
// Configure with muted enabled
var config = new Configuration
{
Controls = new ControlsConfiguration
{
Muted = true
}
};
// Set configuration
await player.SetConfig(config);
player.Play();
Volume Configuration
The implementation of initial volume attribute can be done in Lura Player using the following configuration.
| Attribute | Type | Description |
|---|---|---|
| volume | float | Initial volume of the player between 0.0 and 1.0. Defaults to 1.0 |
using Lura;
using Lura.Unified;
using Tizen.NUI;
// Initialize player
Window window = Window.Instance;
var player = new Player(window);
// Configure with volume
var config = new Configuration
{
Controls = new ControlsConfiguration
{
Volume = 1.0f
}
};
// Set configuration
await player.SetConfig(config);
player.Play();
Loop Configuration
The implementation of loop attribute can be done in Lura Player using the following configuration.
| Attribute | Type | Description |
|---|---|---|
| loop | bool | Loop the video when it ends. Defaults to false. |
using Lura;
using Lura.Unified;
using Tizen.NUI;
// Initialize player
Window window = Window.Instance;
var player = new Player(window);
// Configure with loop enabled
var config = new Configuration
{
Controls = new ControlsConfiguration
{
Loop = true
}
};
// Set configuration
await player.SetConfig(config);
player.Play();
using Lura;
using Lura.Unified;
using Tizen.NUI;
// Initialize player
Window window = Window.Instance;
var player = new Player(window);
// Configure with autoplay, muted, and volume
var config = new Configuration
{
Controls = new ControlsConfiguration
{
Autoplay = true,
Muted = true,
Volume = 1.0f,
Loop = true
}
};
// Set configuration
await player.SetConfig(config);
player.Play();