Created
April 4, 2012 03:50
-
-
Save CF-Terence/2297598 to your computer and use it in GitHub Desktop.
Playing Dune from XBMC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.playMovie = function(file) { | |
if (file === undefined) { | |
var file = self.currentMovieFile; // This would give full path :D:\Movie\MoviesHD\Title of the movie (2011).mkv | |
} | |
// truncate front characters from e.g. D:\Movie\MoviesHD\Title of the movie (2011).mkv to get filename and extension only. | |
var filext = file.slice(14); // Note : Slice characters will depend on directory path e.g. D:\Movie\MoviesHD\ | |
//send command to Dune player. | |
CF.request("http://192.168.0.104/cgi-bin/do?cmd=start_file_playback&media_url=storage_name://Clayton2tb5/Movie/MoviesHD/"+filext, null); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment