Parameter | YouTube recommends setting |
---|---|
-movflags faststart | moov atom at the front of the file (Fast Start) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This is free and unencumbered software released into the public domain. | |
* | |
* Anyone is free to copy, modify, publish, use, compile, sell, or | |
* distribute this software, either in source code form or as a compiled | |
* binary, for any purpose, commercial or non-commercial, and by any | |
* means. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////////////push_notifications.js/////////////////////// | |
var apns = function(){ | |
var pref = require('preferences').preferences; | |
Titanium.Network.registerForPushNotifications({ | |
types: [ | |
Titanium.Network.NOTIFICATION_TYPE_BADGE, | |
Titanium.Network.NOTIFICATION_TYPE_ALERT | |
], | |
success:function(e) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Calculate a precise time difference. | |
* @param string $start result of microtime() | |
* @param string $end result of microtime(); if NULL/FALSE/0/'' then it's now | |
* @return flat difference in seconds, calculated with minimum precision loss | |
*/ | |
function microtime_diff($start, $end = null) | |
{ | |
if (!$end) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_youtube_video_url( $youtube_id ) | |
{ | |
$data = trim(urldecode(file_get_contents('https://youtube.com/get_video_info?video_id=' . $youtube_id))); | |
$d = parse_str($data, $info); | |
$stream_map = trim($info['url_encoded_fmt_stream_map']); | |
if( !$stream_map ) return false; | |
if( substr( $stream_map, 0, 4 ) != "url=" ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Register our settings section | |
* | |
* @return array | |
*/ | |
function ck_edd_settings_section( $sections ) { | |
// Note the array key here of 'ck-settings' | |
$sections['ck-settings'] = __( 'Example EDD Extension', 'example-edd-extension' ); |