ZetPlayer

From Openzet

Jump to: navigation, search

Contents

Introduction

ZetPlayer is a WMV video player to play streaming videos on the web.

You can dynamically control streaming videos using ZetPlayer.

Property

Basic properties to play, stop and pause a video are all provided.

AutoPlay

Specifies whether to play the video automatically.

AutoCycle

Specifies whether to provide a loop.

Source

Url address of the source vide.

Volumn

Volume size

Usage

Add Reference of ZetPlayer.dll from your project.

 
<UserControl x:Class="ZetPlayerRun.Page"
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
 xmlns:control="clr-namespace:Org.Openzet.Control;assembly=ZetPlayer"
 Width="500" Height="325">
 <Grid x:Name="LayoutRoot">
 <control:ZetPlayerControl x:Name="zetPlayer"/>
 </Grid>
</UserControl>


You can use ZetPlayer in a XAML page.

ZetPlayer generic.xaml is provided for custom skins.

,which is contained within the ZetPlayer project.


Override OnApplyTemplate Method to add following codes.

using System;
using System.Windows.Controls;
using System.Diagnostics;
 
namespace ZetPlayerRun
{
 public partial class Page : UserControl
 {
 public Page()
 {
 InitializeComponent();
 
 zetPlayer.Source = new Uri("http://www.openzet.org/SeoMoonTak-LoveNeverFall.wmv");
 }
 public override void OnApplyTemplate()
 {
 this.LayoutRoot = this.GetTemplateChild("ZetPlayer") as Grid;
 Debug.Assert(this.LayoutRoot != null, "NULL");
 base.OnApplyTemplate();
 }
 }
}

This completes the configuration between source file and skins.

Applcation Example

Image:2009-04-08 095117.png

Personal tools
Participation
Silverlight