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 changeImage() { | |
player.requestAsset({ | |
attribute: 'image', | |
type: 'image' | |
}, function(data) { | |
// Ensure the property this relies on actually exists | |
if (data.representations) { | |
// First representation is the original | |
var image = data.representations[0]; | |
// Update link image since new render is not triggered |
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
div { | |
background: url('/img/background.jpg'); | |
} | |
@media only screen and (-webkit-min-device-pixel-ratio: 2) { | |
div { | |
background-image: url('/img/[email protected]'); | |
background-size: 100px 100px; | |
// This should match the dimensions of the original resolution image |
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
// Sess-io by @ThrivingKings | |
// http://thrivingkings.com/read/Sess-iojs-handles-session-expiration-in-pure-JavaScript | |
// Date fix for good ole IE8 | |
if (!Date.now) { | |
Date.now = function() { | |
return new Date().valueOf(); | |
} | |
} |