YouTube Player

Discussion in 'JS Plugin Releases (RMMV)' started by biud436, Jul 5, 2016.

    Tags:
  1. biud436

    biud436 Veteran Veteran

    Messages:
    152
    Likes Received:
    143
    Location:
    South Korea
    First Language:
    Korean
    Primarily Uses:
    RMMV

    YouTube Player 1.0.7


    by Biud436





    Introduction


    This plugin allows you to start playback of the YouTube video.


    Video


    In general, In Android Chrome and Mobile Safari, It doesn't automatically start playback. and you can also stop the video by clicking around the YouTube video. If you watches the video until the end, This plugin will automatically end the video playback.


    How to Use

    • Adding a Plugin to your Project

    Download the plugin and place it in the folder called your_project_directory/js/plugins. Then In Plugin Manager, Select the RS_YoutubePlayer plugin and add it.

    • Plugin Commands


    This plugin command will start playback of the YouTube video.


    Please enter the URL as follows.



    YTPlayer play URL


    Stop playback of the YouTube Video.

    Code:
    
    YTPlayer stop



    Mobile Compatibility Table

    Auto Play / Speed
    Firefox for Android : FALSE / Slow
    Chrome for Android : FALSE / Normal
    Cordova Browers : FALSE / Normal
    Intel XDK (HTML5 + Cordova) : TRUE / Fast



    Plugins


    This plugin can download in the following link.


    Github RAW


    Change Log

    2016.05.08 (v1.0.0) - First Release
    2016.05.09 (v1.0.1) - Added Error Handler
    2016.05.12 (v1.0.2) - Fixed a function that parses a URL.
    2016.07.04 (v1.0.3) - Fixed a few logic about the range were converted to Rectangular object.


    2016.10.06 (v1.0.4) - Added Canvas Filter (This function require my CSS Canvas Filter plugin)


    2016.12.10 (v1.0.5) :
    - Added a plugin parameter about video quality settings.
    - Added the ability to play YouTube videos from a specified time.

    2017.08.31 (v1.0.6) :
    - Added a feature that the video size sets up with a fullscreen mode.
    - Added a feature that can set the video to loop.

    2018.01.08 (v1.0.7) :
    - Now that The YouTube iframe will be newly created every times when playing back the video.
    - Fixed the bug that is not available the function called YTPlayer.isEnded();



    Credit and Thanks
    - Biud436


    Terms of Use
    Free for commercial and non-commercial use.
     
    Last edited: Jan 8, 2018
    #1
    Eliaquim, Kvothe, Frogboy and 11 others like this.
  2. biud436

    biud436 Veteran Veteran

    Messages:
    152
    Likes Received:
    143
    Location:
    South Korea
    First Language:
    Korean
    Primarily Uses:
    RMMV
    v1.0.5 Updated :
      - Added a plugin parameter about video quality settings.
      - Added the ability to play YouTube videos from a specified time.
     
    #2
  3. Harken_W

    Harken_W Veteran Veteran

    Messages:
    80
    Likes Received:
    22
    First Language:
    English
    Primarily Uses:
    N/A
    Great plugin! is there any way to have the youtube video always be on the screen?
     
    #3
  4. biud436

    biud436 Veteran Veteran

    Messages:
    152
    Likes Received:
    143
    Location:
    South Korea
    First Language:
    Korean
    Primarily Uses:
    RMMV
    Perhaps the most important thing to that will playback the video repeatedly.
    But I'm not sure your desired things without a concrete explanation.
    Anyway, Please check a newly updated plugin on your project.
     
    #4
  5. Harken_W

    Harken_W Veteran Veteran

    Messages:
    80
    Likes Received:
    22
    First Language:
    English
    Primarily Uses:
    N/A
    Thanks for adding looping, that's useful to me also!

    I'd like the video to keep playing even when you click elsewhere on the screen. Basically the only way I want the video to go away is when I use the "YTPlayer stop" plugin command. If possible?
     
    #5
  6. biud436

    biud436 Veteran Veteran

    Messages:
    152
    Likes Received:
    143
    Location:
    South Korea
    First Language:
    Korean
    Primarily Uses:
    RMMV
    To edit this plugin, you must have the Text Editor and try to edit certain lines as follows.
    Code:
      Scene_Map.prototype.checkEscapeToYoutube = function() {
        // empty
      };
    
     
    #6
  7. ---

    --- - Member

    Messages:
    26
    Likes Received:
    5
    First Language:
    -
    Primarily Uses:
    RMMV
    I just installed the plugin. I had to add in line 250:

    var YT = YT || {};

    and I found an error related to YTPlayer.isEnded (although the plugin works well).

    Several times I realised that the video seems to load two times instead of only one and this created the video begins, a little stop of the video and it begins to reproduce.

    Can you help me?
     
    #7
  8. biud436

    biud436 Veteran Veteran

    Messages:
    152
    Likes Received:
    143
    Location:
    South Korea
    First Language:
    Korean
    Primarily Uses:
    RMMV
    The global variable named 'YT' will automatically be created from the YouTube iFrame API.

    And I've fixed some issues that you said.
    Thank you for your feedback.
     
    #8
  9. ---

    --- - Member

    Messages:
    26
    Likes Received:
    5
    First Language:
    -
    Primarily Uses:
    RMMV
    I have two questions about the plugin:

    - Is it possible to scale the size of the Youtube screen? My game is in window 1280x720 but can scale until 1920x1080 in fullscreen, but the youtube screen has the same size always.


    - When a video runs, you can press cancel or other keys that open other menus/events (YEP_ButtomCommonEvents to be clearer). Is it possible to change this in your plugin? I can use other ways without problems.


    I haven't investigated much, but the error of restarting the video still continues. It doesn't happen as often as before, but it just happened to me. I have the latest version of the plugin (1.0.7). At this moment I have open several programs, but I think it shouldn't be the problem.

    Thank you for helping me a few days ago.
     
    #9
  10. Taiber

    Taiber Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    Russia
    Primarily Uses:
    RMMV
  11. biud436

    biud436 Veteran Veteran

    Messages:
    152
    Likes Received:
    143
    Location:
    South Korea
    First Language:
    Korean
    Primarily Uses:
    RMMV
    Unfortunately, some videos can't playback in the outside of YouTube.
     
    #11

Share This Page