diff options
author | Allan Wang <me@allanwang.ca> | 2017-10-24 23:29:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-24 23:29:55 -0400 |
commit | c2ca9066c6fd760bd6ef5d2f8f0530a89bfa7b66 (patch) | |
tree | a54665bb873b650b8f6f03b76cd59456ef79e296 /app/src/main/assets/js/media.min.js | |
parent | 64dbf74b7a44a25f41ed7ff2ebfa11db0bc91769 (diff) | |
download | frost-c2ca9066c6fd760bd6ef5d2f8f0530a89bfa7b66.tar.gz frost-c2ca9066c6fd760bd6ef5d2f8f0530a89bfa7b66.tar.bz2 frost-c2ca9066c6fd760bd6ef5d2f8f0530a89bfa7b66.zip |
WIP: Feature/pip video 2 (#405)
* Add dependency
* Test new video view
* Add initial video bindings
* Implement drag to dismiss
* Begin initial integration
* Fix typo
* Fix up url formatter
* Update changelog
* Create first fully integrated video build
* Update translations
* Update translations 2
Diffstat (limited to 'app/src/main/assets/js/media.min.js')
-rw-r--r-- | app/src/main/assets/js/media.min.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app/src/main/assets/js/media.min.js b/app/src/main/assets/js/media.min.js new file mode 100644 index 00000000..c965f515 --- /dev/null +++ b/app/src/main/assets/js/media.min.js @@ -0,0 +1,21 @@ +if(!window.hasOwnProperty("frost_media")){ +console.log("Registering frost_media"), +window.frost_media=!0 +;var _frostMediaClick=function(t){ +var e=t.target||t.srcElement +;if(e.hasAttribute("data-sigil")&&e.getAttribute("data-sigil").includes("playInlineVideo")&&(console.log("Found inline video"), +e=e.parentNode, +e.hasAttribute("data-store"))){ +var i +;try{ +i=JSON.parse(e.getAttribute("data-store")) +}catch(t){ +return +} +i.src&&(console.log("Inline video",i.src),"undefined"!=typeof Frost&&Frost.loadVideo(i.src), +t.stopPropagation(), +t.preventDefault()) +} +} +;document.addEventListener("click",_frostMediaClick,!0) +}
\ No newline at end of file |