2014-01-08 34 views
0

如何在不同的應用程序中播放Ooyala視頻中的hook player?Android play Ooyala Video with Hook player

public class MainActivity extends Activity { 
    @Override protected void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    setContentView(R.layout.activity_main); 

    Intent launchHook = new Intent(Intent.ACTION_VIEW, Uri.parse 
    (<"ooyala://pcode/embed code/null/time_in_seconds">)); 
    startActivity(launchHook); 
    } 
}  

回答

0

Ooyala Documentation不正確,創建一個意圖打開「鉤子移動播放器應用程序」必須是Ooyala的視頻(沒有「<」和「>」字符):

public class MainActivity extends Activity { 
    @Override protected void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    setContentView(R.layout.activity_main); 
    Intent launchHook = new Intent(Intent.ACTION_VIEW, Uri.parse("ooyala://pcode/embed code/null/time_in_seconds")); 
    startActivity(launchHook); 
    } 
} 

哪裏:

  • 的pcode:在Ooyala的外景定義的視頻player_id。
  • 嵌入代碼:在Ooyala Backlot中定義的視頻content_id。
  • null:有效標記或字符串「null」,不是必需的。
  • time_in_seconds:以秒爲單位指定視頻中啓動應用的時間,不是必需的。
Intent launchHook = new Intent(Intent.ACTION_VIEW, Uri.parse("ooyala://c9565052281a402ebf432dca9b59b2ca/45cjJ0ZDrfOUerwSu6BbChfItUCDCxZE")); 
// Intent launchHook = new Intent(Intent.ACTION_VIEW, Uri.parse("ooyala://c9565052281a402ebf432dca9b59b2ca/45cjJ0ZDrfOUerwSu6BbChfItUCDCxZE/null/10")); 
startActivity(launchHook);