From: Tomasz Marciniak Date: Tue, 5 May 2015 07:33:24 +0000 (+0200) Subject: [MediaController] Added base files for tutorial and guide. X-Git-Tag: tizen_3.0/TD_SYNC/20161201~843^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b3f75a10aee7d9c46e401a363759af955ea757df;p=sdk%2Fonline-doc.git [MediaController] Added base files for tutorial and guide. Change-Id: I9c3d3de517e23b9a495377abb9c72c520c31d248 Signed-off-by: Tomasz Marciniak --- diff --git a/org.tizen.guides/html/index.htm b/org.tizen.guides/html/index.htm index baaa6af..a361cc0 100644 --- a/org.tizen.guides/html/index.htm +++ b/org.tizen.guides/html/index.htm @@ -52,6 +52,7 @@
  • Multimedia diff --git a/org.tizen.guides/html/web/tizen/multimedia/media_controller_w.htm b/org.tizen.guides/html/web/tizen/multimedia/media_controller_w.htm new file mode 100644 index 0000000..e0f1bfe --- /dev/null +++ b/org.tizen.guides/html/web/tizen/multimedia/media_controller_w.htm @@ -0,0 +1,79 @@ + + + + + + + + + + + + + Media Controller + + + + + +
    +

    Media Controller

    + +

    The MediaController API provides functions for communication between the media controller server and the media controller client.

    + + + + + + + + + + +
    Note
    The Media Controller API is mandatory for both Tizen mobile and wearable profiles, which means that it is supported in all mobile and wearable devices. +

    All mandatory APIs are supported on the Tizen Emulators.

    + +

    The main features of the Media Controller API include:

    + + + + +
    + +Go to top + + + + + + + diff --git a/org.tizen.guides/index.xml b/org.tizen.guides/index.xml index d7db438..551a08a 100644 --- a/org.tizen.guides/index.xml +++ b/org.tizen.guides/index.xml @@ -24,6 +24,7 @@ + diff --git a/org.tizen.tutorials/html/index.htm b/org.tizen.tutorials/html/index.htm index 14f3594..6e38098 100644 --- a/org.tizen.tutorials/html/index.htm +++ b/org.tizen.tutorials/html/index.htm @@ -63,6 +63,7 @@
  • Multimedia diff --git a/org.tizen.tutorials/html/web/tizen/multimedia/media_controller_tutorial_w.htm b/org.tizen.tutorials/html/web/tizen/multimedia/media_controller_tutorial_w.htm new file mode 100644 index 0000000..f269e21 --- /dev/null +++ b/org.tizen.tutorials/html/web/tizen/multimedia/media_controller_tutorial_w.htm @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + Media Controller: Communication between the media controller server and client. + + + + + + +
    +

    Media Controller: Communication between the media controller server and client.

    + + +

    This tutorial demonstrates how you can receive information from the media controller server and how to control media controller server state from the client by sending commands.

    + + + + + + + + + + +
    Note
    The Media Controller API is mandatory for both Tizen mobile and wearable profiles, which means that it is supported in all mobile and wearable devices. +

    All mandatory APIs are supported on the Tizen Emulators.

    + +

    Warm-up

    +

    Become familiar with the Media Controller API basics by learning about:

    + + +

    Example 1 title

    + +

    Feature description.

    +
      +
    1. Step description e.g: create the media controller server using the createServer() method: + +
      +code snippets e.g
      +
      +var mcServer = tizen.mediaController.createServer();
      +
      + +
    2. +
    3. Step description e.g: Get the client object using the getClient() method. + +
      +code snippets e.g
      +
      +try {
      +   var mcClient = tizen.mediaController.getClient();
      +} catch (err) {
      +   console.log (err.name +': ' + err.message);
      +}
      + +
    4. +
    5. Step description e.g: Change playback state of media controller server using the sendPlaybackState() method: + +
      +code snippets e.g
      +
      +var mcClient = tizen.mediaController.getClient();
      +var mcServerInfo = mcClient.getLatestServerInfo();
      +
      +mcServerInfo.sendPlaybackState("STOP", function() {
      +   console.log("Playback has stopped");
      +}, function(e) {
      +   console.log("Unable to change playback state: " + e.message);
      +});
      + +
    6. +
    + +

    Example 2 title

    + +

    Feature description.

    +
      +
    1. Step description e.g: create the media controller server using the createServer() method: + +
      +code snippets e.g
      +
      +var mcServer = tizen.mediaController.createServer();
      +
      + +
    2. +
    3. Step description e.g: Get the client object using the getClient() method. + +
      +code snippets e.g
      +
      +try {
      +   var mcClient = tizen.mediaController.getClient();
      +} catch (err) {
      +   console.log (err.name +': ' + err.message);
      +}
      + +
    4. +
    5. Step description e.g: Change playback state of media controller server using the sendPlaybackState() method: + +
      +code snippets e.g
      +
      +var mcClient = tizen.mediaController.getClient();
      +var mcServerInfo = mcClient.getLatestServerInfo();
      +
      +mcServerInfo.sendPlaybackState("STOP", function() {
      +   console.log("Playback has stopped");
      +}, function(e) {
      +   console.log("Unable to change playback state: " + e.message);
      +});
      + +
    6. +
    + +

    Example 3 title

    + +

    Feature description.

    +
      +
    1. Step description e.g: create the media controller server using the createServer() method: + +
      +code snippets e.g
      +
      +var mcServer = tizen.mediaController.createServer();
      +
      + +
    2. +
    3. Step description e.g: Get the client object using the getClient() method. + +
      +code snippets e.g
      +
      +try {
      +   var mcClient = tizen.mediaController.getClient();
      +} catch (err) {
      +   console.log (err.name +': ' + err.message);
      +}
      + +
    4. +
    5. Step description e.g: Change playback state of media controller server using the sendPlaybackState() method: + +
      +code snippets e.g
      +
      +var mcClient = tizen.mediaController.getClient();
      +var mcServerInfo = mcClient.getLatestServerInfo();
      +
      +mcServerInfo.sendPlaybackState("STOP", function() {
      +   console.log("Playback has stopped");
      +}, function(e) {
      +   console.log("Unable to change playback state: " + e.message);
      +});
      + +
    6. +
    + +

    Example 4 title

    + +

    Feature description.

    +
      +
    1. Step description e.g: create the media controller server using the createServer() method: + +
      +code snippets e.g
      +
      +var mcServer = tizen.mediaController.createServer();
      +
      + +
    2. +
    3. Step description e.g: Get the client object using the getClient() method. + +
      +code snippets e.g
      +
      +try {
      +   var mcClient = tizen.mediaController.getClient();
      +} catch (err) {
      +   console.log (err.name +': ' + err.message);
      +}
      + +
    4. +
    5. Step description e.g: Change playback state of media controller server using the sendPlaybackState() method: + +
      +code snippets e.g
      +
      +var mcClient = tizen.mediaController.getClient();
      +var mcServerInfo = mcClient.getLatestServerInfo();
      +
      +mcServerInfo.sendPlaybackState("STOP", function() {
      +   console.log("Playback has stopped");
      +}, function(e) {
      +   console.log("Unable to change playback state: " + e.message);
      +});
      + +
    6. +
    + + + + +
    + +Go to top + + + + + + + diff --git a/org.tizen.tutorials/index.xml b/org.tizen.tutorials/index.xml index 4cf2000..d4b70f7 100644 --- a/org.tizen.tutorials/index.xml +++ b/org.tizen.tutorials/index.xml @@ -29,6 +29,7 @@ +