언어 설정

Menu
Sites
Language
Use audio player functionality

Hey,

In the Audio-Video tutorial there is a section on audio playback service (https://developer.tizen.org/documentation/articles/audio-video-playback-tutorial#Audioplayback). Is it possible to incorporate that same functionality in my web application without launcing the native player's controls?
(in that case, using my custom ones)

 

Raghavendra, I'm sure you'd have some suggestions on that.

gracias

Edited by: Brock Boland on 17 3월, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

5 댓글
Raghavendra Reddy Shiva
Yes, you can launch any application as a provider application (or as a service) from the current running application (assuming your custom player is a different application) and for that you should be having the application ID of the provider application for an explicit launch or provide enough information (like Operation, URI, MIME and if needed App control data) to the system to launch your custom application implicitly. Below is sample code to explain how it works, The base application will be doing something like below to share the data ( Implicit launch), var appControl = new tizen.ApplicationControl( "http://tizen.org/appcontrol/operation/share", "share.html", "image/*", null, [new tizen.ApplicationControlData("images", [imagedata1, imagedata2])] ); // Implicit launch with control data tizen.application.launchAppControl( appControl, null, function() {console.log("launch application control succeed"); }, function(e) {console.log("launch application control failed. reason: " + e.message); }, appControlReplyCallback ); And in the provider application, you can retrieve the data passed or shared in the following way. // First, retrieve the reference of the RequestedApplicationControl object var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl(); if (reqAppControl) { var processedData = processData(reqAppControl.appControl); // Pass the control back to the requesting application reqAppControl.replyResult(processedData); } // Function which processes the data passed function processData(reqAppControl.appControl) { var reqData = reqAppControl.appControl.data; console.log("App ctrl Key: " + reqData[0].key+" Data:"+reqData[0].value); } Refer below documentaion to know more about the Application Control. https://developer.tizen.org/help/topic/org.tizen.web.appprogramming/html/guide/app_guide/application.htm
Varsamis
Hey Raghavendra, Let me rephrase my question. I've developed an application which has custom music control buttons; it's a single application, not a custom player AND another app making us of it. What I'm asking for is the ability to use the default audio player's functionality (play music tracks, radio feeds etc.) while the control remains in my own app (so, without launcing the UI of tizen's player).
Raghavendra Reddy Shiva
Currently, web applications can either launch and use the native music player itself OR use the web Audio API's (with HTML5 Audio element) for the audio playback. There are NO interfaces available to access the native player's playback control (like play, pause, seek etc ) methods in web applications which intend to uses its own custom playback controls. Currently , using the Tizen's Content device API, you can just list the audio/video content available on your device in web apps and NO API's for playback controls. On contrary in native application, you can use the "Tizen::Media::Player" class provided by the "Tizen::Media" namespace, which enables your application to use the custom UI interface to control the media playback (of native media player). And this is exactly, what you want in your application. If your web applications demands interfaces to control the native player, then you might have to choose hybrid application instead of web application. Hope this clarifies.
Varsamis
Yes, that was really helpful. Thanks!
Alex Dem
minor note: There are examples of hybrid applications in Tizen SDK. a)Tizen Native Project->Sample->HybridServiceApp b)Tizen Web Project->Sample->Hybrid Application So you could find how Web and Native apps are interconnected via MessagePortManager in these examples.