Skip to content

v1.0.3

Latest

Choose a tag to compare

@deckameron deckameron released this 02 Jan 12:46

Added video sharing support!

// Share video
ShareModule.share({
    message: "Watch this!",
    subject: "Cool video",
    media: "/videos/demo.mp4"
});

// Share video file
const videoFile = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'video.mp4');
ShareModule.share({
    message: "My video",
    media: videoFile.read()
});

// Share video from url
ShareModule.share({
    message: "Watch this awesome video!",
    subject: "Video to share",
    media: "https://www.example.com/videos/demo.mp4",
    callback: function(e) {
        if (e.success) {
            Ti.API.info("Video shared successfully!");
        } else {
            Ti.API.error("Share failed: " + e.message);
        }
    }
});