vimeo player testing commit
Showing
4 changed files
with
46 additions
and
30 deletions
... | @@ -86,32 +86,39 @@ define(['jquery', 'core/yui', 'core/str', 'core/config', 'core/notification'], f | ... | @@ -86,32 +86,39 @@ define(['jquery', 'core/yui', 'core/str', 'core/config', 'core/notification'], f |
86 | params['sesskey'] = M.cfg.sesskey; | 86 | params['sesskey'] = M.cfg.sesskey; |
87 | var url= $(location).attr('href'); | 87 | var url= $(location).attr('href'); |
88 | //notes player time starts | 88 | //notes player time starts |
89 | /*$('document').ready(function(){ | 89 | $('document').ready(function(){ |
90 | if(url.includes('/mod/page/view.php')){ | 90 | if(url.includes('/mod/page/view.php')){ |
91 | 91 | ||
92 | var iframe = document.querySelector('iframe'); | 92 | var iframe = document.querySelector('iframe'); |
93 | // console.log(iframe); | 93 | // console.log(iframe); |
94 | var player = new Vimeo.Player(iframe); | 94 | var player = new Vimeo.Player(iframe); |
95 | // console.log(player); | 95 | console.log("player"); |
96 | console.log(player); | ||
97 | player.pause().then(function() { | ||
98 | }) | ||
99 | |||
96 | var time; | 100 | var time; |
97 | player.getCurrentTime().then(function(seconds) { | 101 | player.getCurrentTime().then(function(seconds) { |
98 | 102 | ||
99 | time=seconds; | 103 | var str = '</br></br><font color="green">newly You have taken notes at '; |
104 | str +=seconds; | ||
105 | str +=" secs in this video.</font>"; | ||
106 | |||
107 | params['notestime'] = str; | ||
100 | }) | 108 | }) |
101 | // | 109 | // |
102 | console.log("i am here"); | 110 | |
103 | 111 | ||
104 | var str = '</br></br><font color="green">newly You have taken notes at '; | 112 | |
105 | console.log(time); | 113 | |
106 | str +=time; | 114 | |
107 | str +=" secs in this video.</font>"; | 115 | |
108 | // var result = str.fontcolor("green"); | 116 | // var result = str.fontcolor("green"); |
109 | params['notestime'] = str; | ||
110 | 117 | ||
111 | player.pause().then(function() { | 118 | |
112 | }) | 119 | |
113 | } | 120 | } |
114 | });*/ | 121 | }); |
115 | //notes player time ends | 122 | //notes player time ends |
116 | 123 | ||
117 | var cfg = { | 124 | var cfg = { | ... | ... |
1 | define(["jquery"],function(e){return{init:function(){var n=e(location).attr("href");e("document").ready(function(){if(n.includes("/mod/page/view.php")){var o=document.querySelector("iframe"),i=new Vimeo.Player(o);console.log(i),e("#mynotepencil").click(function(){var e;i.getCurrentTime().then(function(n){console.log("timer function"),e=n}),console.log(e)})}})}}}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | define(["jquery"],function(e){return{init:function(){var n=e(location).attr("href");e("document").ready(function(){if(n.includes("/mod/page/view.php")){var i=document.querySelector("iframe"),t=new Vimeo.Player(i);console.log(t),e("#mynotepencil").click(function(){t.getCurrentTime().then(function(e){})})}})}}}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -86,32 +86,39 @@ define(['jquery', 'core/yui', 'core/str', 'core/config', 'core/notification'], f | ... | @@ -86,32 +86,39 @@ define(['jquery', 'core/yui', 'core/str', 'core/config', 'core/notification'], f |
86 | params['sesskey'] = M.cfg.sesskey; | 86 | params['sesskey'] = M.cfg.sesskey; |
87 | var url= $(location).attr('href'); | 87 | var url= $(location).attr('href'); |
88 | //notes player time starts | 88 | //notes player time starts |
89 | /*$('document').ready(function(){ | 89 | $('document').ready(function(){ |
90 | if(url.includes('/mod/page/view.php')){ | 90 | if(url.includes('/mod/page/view.php')){ |
91 | 91 | ||
92 | var iframe = document.querySelector('iframe'); | 92 | var iframe = document.querySelector('iframe'); |
93 | // console.log(iframe); | 93 | // console.log(iframe); |
94 | var player = new Vimeo.Player(iframe); | 94 | var player = new Vimeo.Player(iframe); |
95 | // console.log(player); | 95 | console.log("player"); |
96 | console.log(player); | ||
97 | player.pause().then(function() { | ||
98 | }) | ||
99 | |||
96 | var time; | 100 | var time; |
97 | player.getCurrentTime().then(function(seconds) { | 101 | player.getCurrentTime().then(function(seconds) { |
98 | 102 | ||
99 | time=seconds; | 103 | var str = '</br></br><font color="green">newly You have taken notes at '; |
104 | str +=seconds; | ||
105 | str +=" secs in this video.</font>"; | ||
106 | |||
107 | params['notestime'] = str; | ||
100 | }) | 108 | }) |
101 | // | 109 | // |
102 | console.log("i am here"); | 110 | |
103 | 111 | ||
104 | var str = '</br></br><font color="green">newly You have taken notes at '; | 112 | |
105 | console.log(time); | 113 | |
106 | str +=time; | 114 | |
107 | str +=" secs in this video.</font>"; | 115 | |
108 | // var result = str.fontcolor("green"); | 116 | // var result = str.fontcolor("green"); |
109 | params['notestime'] = str; | ||
110 | 117 | ||
111 | player.pause().then(function() { | 118 | |
112 | }) | 119 | |
113 | } | 120 | } |
114 | });*/ | 121 | }); |
115 | //notes player time ends | 122 | //notes player time ends |
116 | 123 | ||
117 | var cfg = { | 124 | var cfg = { | ... | ... |
... | @@ -15,14 +15,16 @@ define(['jquery'], function($) { | ... | @@ -15,14 +15,16 @@ define(['jquery'], function($) { |
15 | console.log(player); | 15 | console.log(player); |
16 | $('#mynotepencil').click(function(){ | 16 | $('#mynotepencil').click(function(){ |
17 | 17 | ||
18 | var time; | ||
19 | 18 | ||
20 | player.getCurrentTime().then(function(seconds) { | 19 | player.getCurrentTime().then(function(seconds) { |
21 | console.log("timer function"); | 20 | // console.log(seconds); |
22 | time=seconds; | 21 | // console.log("seconds"); |
22 | // mynotestime=seconds; | ||
23 | var self=seconds; | ||
24 | var $mynotestime=seconds; | ||
23 | }) | 25 | }) |
24 | 26 | // console.log($mynotestime); | |
25 | console.log(time); | 27 | // console.log(self); |
26 | 28 | ||
27 | // setTimeout(function(){ | 29 | // setTimeout(function(){ |
28 | 30 | ... | ... |
-
Please register or sign in to post a comment