Skip to content

Instantly share code, notes, and snippets.

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 +
var currentFile = 'file.mp4';
var filePath = null;
switch(Titanium.getPlatform()) {
// Apple
case 'osx':
filePath = "file:///" + filesPath + currentFile;
// Windows
case 'win32':
filePath = "file:///" + filePath.replace(/\134/g,"/") + currentFile;
// 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.