Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Logeshwaran
/
mynotes
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
8
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
0c363c29
authored
2018-09-20 21:16:34 +0530
by
logesh
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
vimeo player testing commit
1 parent
65c54cac
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
30 deletions
amd/build/mynotesblock.js
amd/build/script.min.js
amd/src/mynotesblock.js
amd/src/script.js
amd/build/mynotesblock.js
View file @
0c363c2
...
...
@@ -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
=
{
...
...
amd/build/script.min.js
View file @
0c363c2
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
...
...
amd/src/mynotesblock.js
View file @
0c363c2
...
...
@@ -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
=
{
...
...
amd/src/script.js
View file @
0c363c2
...
...
@@ -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(){
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment