strict warning: Only variables should be assigned by reference in /home/itechpros/servoyguy.com/sites/all/modules/links/links.inc on line 1434.

Play Media File

Play an audo or movie file in the default play on Windows or Mac.

var urlPath = arguments[0]
if(utils.stringMiddle(application.getOSName(),1,7) == "Windows")
{ 
application.executeProgram("C:/Program Files/Windows Media Player/wmplayer.exe",urlPath)
} 
else 
{ 
var myApplescript = 'tell application "QuickTime Player" \n open location "' + urlPath + '" \n activate \n end tell'
application.executeProgram('osascript','-e', myApplescript) 
}