Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example on how to set the file path for embedding videos on Mac OS X and Windows with Titanium
var filesPath = Titanium.API.application.dataPath +
Titanium.Filesystem.getSeparator();
var currentFile = 'file.mp4';
var filePath = null;
switch(Titanium.getPlatform()) {
// Apple
case 'osx':
filePath = "file:///" + filesPath + currentFile;
break;
// Windows
case 'win32':
filePath = "file:///" + filePath.replace(/\134/g,"/") + currentFile;
break;
}
// Embed file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.