Skip to content

Commit 876cd67

Browse files
committed
rm mobile
1 parent bb87a3e commit 876cd67

File tree

2 files changed

+5
-31
lines changed

2 files changed

+5
-31
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ This is an early version so there is still room for improvement.
3939
| **format*** | The aspect ratio of movies in your playlist<br/>Available: **16by9, 21by9, 2by1**<br/>Default: **'16by9'** |
4040
| **container*** | The HTML element that the player will be placed in<br/>Default: **null** |
4141
| **rounded*** | Adds rounded edges to the player and carousel items<br/>Default: **true** |
42-
| **autoplay*** | Start playback automatically<br/>Default: **false** |
4342
| **playnext*** | Automatically play next videos<br/>Default: **true** |
44-
| **showcontrols*** | Show interface elements like play and next buttons<br/>Default: **true** |
43+
| **autoplay*** | Start playback automatically<br/>Default: **false** |
44+
| **showcontrols*** | Show interface elements like play and next buttons<br/>Default: **false** |
4545
| **showtitles*** | Show videos titles below thumbnails<br/>Default: **false** |
4646
| **showinfo*** | Setting this parameter to FALSE causes the Player to not show information such as the movie title or uploader name before the movie starts.<br/>Default: **false** |
4747
| **showrelated*** | This parameter determines whether the player should show similar movies after the video has finished playing.<br/>Default: **false** |

src/js/ytpp.js

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class YTPP
1919
#_rounded = true;
2020
#_autoplay = false;
2121
#_playnext = true;
22-
#_showControls = true;
22+
#_showControls = false;
2323
#_showTitles = false;
2424
#_showInfo = false;
2525
#_showRelated = false;
@@ -239,7 +239,8 @@ class YTPP
239239
{
240240
'onReady': function(e)
241241
{
242-
console.log(e);
242+
console.log('CODE: ', e.data);
243+
console.log("target: "+e.target.getIframe().id);
243244
//ready
244245
},
245246
'onStateChange': function(e)
@@ -358,31 +359,4 @@ class YTPP
358359

359360
//iframeApi.onload = function(){}
360361
}
361-
362-
#MobileDetector()
363-
{
364-
this.#_isMobile = (navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/BlackBerry/i) || navigator.userAgent.match(/iPhone|iPad|iPod/i) || navigator.userAgent.match(/Opera Mini/i) || navigator.userAgent.match(/IEMobile/i));
365-
this.#_isIos = navigator.userAgent.match(/iPhone|iPad|iPod/i);
366-
367-
if(this.#_debug)
368-
if(this.#_isMobile && this.#_isIos)
369-
YTPP.ConsoleWrite('iOS device');
370-
else if(this.#_isMobile)
371-
YTPP.ConsoleWrite('Mobile device');
372-
else
373-
YTPP.ConsoleWrite('Desktop device');
374-
}
375-
376-
static #ParseTrue( value )
377-
{
378-
return ( value == true || value == 'true' || value == 1 || value == '1' || value > 0 );
379-
}
380-
381-
static ConsoleWrite(message, color="#fff", data = null )
382-
{
383-
if(data != null)
384-
console.log( "%cYTPP: "+"%c" + message, "color:#dc3545;font-weight: bold;", "color: " + color, data );
385-
else
386-
console.log( "%cYTPP: "+"%c" + message, "color:#dc3545;font-weight: bold;", "color: " + color );
387-
}
388362
}

0 commit comments

Comments
 (0)