0c363c29 by logesh

vimeo player testing commit

1 parent 65c54cac
......@@ -86,32 +86,39 @@ define(['jquery', 'core/yui', 'core/str', 'core/config', 'core/notification'], f
params['sesskey'] = M.cfg.sesskey;
var url= $(location).attr('href');
//notes player time starts
/*$('document').ready(function(){
$('document').ready(function(){
if(url.includes('/mod/page/view.php')){
var iframe = document.querySelector('iframe');
// console.log(iframe);
var player = new Vimeo.Player(iframe);
// console.log(player);
console.log("player");
console.log(player);
player.pause().then(function() {
})
var time;
player.getCurrentTime().then(function(seconds) {
time=seconds;
var str = '</br></br><font color="green">newly You have taken notes at ';
str +=seconds;
str +=" secs in this video.</font>";
params['notestime'] = str;
})
//
console.log("i am here");
var str = '</br></br><font color="green">newly You have taken notes at ';
console.log(time);
str +=time;
str +=" secs in this video.</font>";
// var result = str.fontcolor("green");
params['notestime'] = str;
player.pause().then(function() {
})
}
});*/
});
//notes player time ends
var cfg = {
......
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
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
......
......@@ -86,32 +86,39 @@ define(['jquery', 'core/yui', 'core/str', 'core/config', 'core/notification'], f
params['sesskey'] = M.cfg.sesskey;
var url= $(location).attr('href');
//notes player time starts
/*$('document').ready(function(){
$('document').ready(function(){
if(url.includes('/mod/page/view.php')){
var iframe = document.querySelector('iframe');
// console.log(iframe);
var player = new Vimeo.Player(iframe);
// console.log(player);
console.log("player");
console.log(player);
player.pause().then(function() {
})
var time;
player.getCurrentTime().then(function(seconds) {
time=seconds;
var str = '</br></br><font color="green">newly You have taken notes at ';
str +=seconds;
str +=" secs in this video.</font>";
params['notestime'] = str;
})
//
console.log("i am here");
var str = '</br></br><font color="green">newly You have taken notes at ';
console.log(time);
str +=time;
str +=" secs in this video.</font>";
// var result = str.fontcolor("green");
params['notestime'] = str;
player.pause().then(function() {
})
}
});*/
});
//notes player time ends
var cfg = {
......
......@@ -15,14 +15,16 @@ define(['jquery'], function($) {
console.log(player);
$('#mynotepencil').click(function(){
var time;
player.getCurrentTime().then(function(seconds) {
console.log("timer function");
time=seconds;
// console.log(seconds);
// console.log("seconds");
// mynotestime=seconds;
var self=seconds;
var $mynotestime=seconds;
})
console.log(time);
// console.log($mynotestime);
// console.log(self);
// setTimeout(function(){
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!