Skip to main content

Getting Started

info

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

Configuration of the Lura Player is very straight forward and on point.

To start simple, we will start with the basic attributes to play a video. There are two ways to play a video in Lura Player.

Lura configuration for content playback

This is the most simple way of playing videos. Lura Player will configure itself based on the play configuration you have configured from MCP. To see more details, check out Lura Configuration

AttributeTypeDescription
appKeystringAppKey generated in MCP based on the pre-adjusted play configuration
assetIdstringAssetId of the VOD or the Live Stream
tokenstring(Optional) When specified the provided token will be used in entitlements requests.
Player.cs
using Lura;
using Lura.Unified;
using Tizen.NUI;

// Initialize the player
Window window = Window.Instance;
var player = new Player(window);

// Configure the player with Lura settings
var config = new Configuration
{
Lura = new LuraConfiguration
{
AppKey = "<YOUR_APP_KEY>",
AssetId = "<ASSET_ID>"
}
};

// Set the configuration and play
await player.SetConfig(config);
player.Play();

Manual media configuration for content playback

To manually configure the media, you need to add following media objects and attributes based on your needs.

Here is an example code to play a media with all features.

Player.cs
using Lura;
using Lura.Unified;
using Tizen.NUI;

// Initialize the player
Window window = Window.Instance;
var player = new Player(window);

// Configure player with manual media configuration
var config = new Configuration
{
Content = new ContentConfiguration
{
Title = "Example title",
Description = "Example description",
Media = new List<ContentMedia>
{
new ContentMedia
{
Url = "https://media.example.com/hls.m3u8",
Type = MediaMimeType.VideoHls
},
new ContentMedia
{
Url = "https://media.example.com/dash.mpd",
Type = MediaMimeType.VideoDash
},
new ContentMedia
{
Url = "https://media.example.com/mp4.mp4",
Type = MediaMimeType.VideoMp4
},
new ContentMedia
{
Url = "https://media.example.com/poster.webp",
Type = PosterMimeType.Webp
},
new ContentMedia
{
Url = "https://media.example.com/trick-play.bif",
Type = PosterMimeType.Bif
},
new ContentMedia
{
Url = "https://media.example.com/caption-en.vtt",
Type = SubtitleMimeType.Vtt,
Language = "en"
}
}
}
};

// Set the configuration and play
await player.SetConfig(config);
player.Play();