Windows8:Smooth Streaming Client SDK (Beta)

水曜日 , 28, 3月 2012 1 Comment

(本記事はWindows8Consumer PreviewとVisualStudio11β環境で動作を確認しています)

 

Smooth Streaming Client SDK (Beta)が公開されていたので試してみました。

 

SmoothStreamingとは異なる帯域の動画を切り替えて再生することで、スムーズに動画を再生することのできる仕組みです。

そのWindows8版のβを試してみました。

利用するには

 

Smooth Streaming Client SDK Beta

Player Framework for Windows 8 Metro (Preview)

 

が必要です。

SmoothStreamingSDKbeta

 

Player Framework for Windows 8 Metro (Preview)

 

Xaml-based Metro style applications

 

まずはXAML+C#でSmoothStreaming再生アプリを作成する方法です。

 

1.参照を追加する

ソリューションエクスプローラー上で右クリック→参照の追加

 

参照マネージャーの左タブ「Windows」→「拡張子」

上記画像の4つを参照に追加します。

 

4つが表示されない場合は

Smooth Streaming Client SDK Beta

Player Framework for Windows 8 Metro (Preview)

のファイルをインストールし忘れている可能性があります。

 

Package.appxmanifestに以下を追記、

 

  <Extensions>
    <Extension Category="windows.activatableClass.inProcessServer">
      <InProcessServer>
        <Path>Microsoft.Media.SmoothStreaming.dll</Path>
        <ActivatableClass ActivatableClassId="Microsoft.Media.SmoothStreaming" ThreadingModel="both" />
      </InProcessServer>
    </Extension>
  </Extensions>

 

場所は</Capabilities>の下です(下画像参照)。

 

 

Pageタグにxmlnsを追加、

 

xmlns:mmppf="using:Microsoft.PlayerFramework"

 

簡単な動画プレイヤーを配置するコードは以下、

<Page
    x:Class="SmoothStreamingSample.BlankPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:SmoothStreamingSample"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:mmppf="using:Microsoft.PlayerFramework"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundBrush}">
        <mmppf:MediaPlayer Source="http://video3.smoothhd.com.edgesuite.net/ondemand/Big%20Buck%20Bunny%20Adaptive.ism/Manifest"/>
    </Grid>
</Page>

 

構成マネージャーで64ビットを選択。

 

おおっ再生できた!!

(ブロックが出たり途中で落ちたりするのは完成度か私のWin8のビデオドライバーの問題か?)

 

 

XAMLビューがエラーで表示できないのが痛いところ・・・まぁ、まだβですもんね。

 \Microsoft.SmoothStreaming.Client.SDK\1.0\Redist\CommonConfiguration\Neutral’ の一部が見つかりませんでした。

 

公式ページのDiscussionでも投稿されてますね。

 

IsCaptionsActive=”True”でキャプションを表示することも可能。

参考サイトはここ

 

HTML/JavaScript-based Metro style applications

 

続いてJavaScript+HTMLでも作ってみよう。

私にとって初のJavaScriptでのメトロスタイルアプリ。

・・・

・・・・

・・・・・

 

 

・・・ならず、残念。

リベンジはいつかきっと!!

 


One thought on “ : Windows8:Smooth Streaming Client SDK (Beta)”
  • .NET Clips より:

    眠るシーラカンスと水底のプログラマー » Blog Archiv » Windows8:Smooth Streaming Client SDK (Beta)…

    素敵なエントリーの登録ありがとうございます – .NET Clipsからのトラックバック…

  • .NET Clips へ返信する コメントをキャンセル

    メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

    このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください