Question
I've developed a file browser web application that allows users to open files using installed applications. The application works well on mobile devices using the following code:
var appControl = new tizen.ApplicationControl(
'http://tizen.org/appcontrol/operation/view',
path_to_file,
file_mime,
null,
null
);
However, when testing on Tizen TV (using the simulator), I receive an error indicating no suitable application is available to open video/audio files.
Questions:
- Do I need to implement my own video/audio player for this solution?
- Is there a downloadable video/audio application that can be used to open these files?
Answer
Problem Understanding
The issue occurs when trying to use the ApplicationControl API to open media files on Tizen TV, where the system cannot find an appropriate application to handle the file types.
Solution Methods
-
Using Native TV Player:
- Tizen TV has a native video player that should handle common media formats
- Try specifying the package name/app ID of the native player in your ApplicationControl
-
Alternative Approach:
- Consider implementing an embedded player as a fallback option
- The Samsung Developer Forum provides relevant samples:
Code Examples
For implementing your own player, you might use:
// Example using AVPlay API
var player = new AVPlay();
player.open("file://" + path_to_file);
player.play();
Additional Tips
- Test on actual TV hardware if possible, as simulator behavior might differ
- Check file permissions and paths when accessing files
- For TV-specific questions, consult the Tizen TV developer community