Skip to content

Instantly share code, notes, and snippets.

View Mindelusions's full-sized avatar

Anthony Decena Mindelusions

View GitHub Profile
@19h
19h / TiYoutube.js
Last active November 11, 2015 16:24
Titanium Mobile SDK iPhone / Android: Extract Youtube Video URL / URI from video-id / identification / name and play mp4 file. (Workaround for the recent change of security in Youtube)
Titanium.App.addEventListener("playvideo", function (e) {
var win11 = Titanium.UI.createWindow({
orientationModes: [Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT],
title: "Video",
zIndex: 222222
});
var activeMovie = Titanium.Media.createVideoPlayer({
fullscreen: !0,
autoplay: !0,
@davemackintosh
davemackintosh / Array.prototype.recursiveArrayIterator.js
Created December 10, 2012 11:06
JavaScript recursive array iterator
/**
* Prototype for recursively iterating over an array of
* arrays.
* @author Dave Mackintosh
* @param callback function
*/
Array.prototype.recursiveArrayIterator = function (cb) {
this.forEach(function (obj, inx) {
// If it's an array we want to fire another iterator
// with our parent array as a separate argument