YouTube videos are too large on mobile devices



  • Aware of the issue. Will sort it this evening. 🙂



  • Ok, Updated to 0.4.6.

    @exodo You will need to clear your cache, seems some old CSS is still loading, the updated version displays the red play button as it does on a proper youtube embed etc. So if you still see the black one, cache will be your enemy.

    If the videos appear slightly smaller on Desktop, try restarting your forum. I've gone with a slightly different method of calculating width and height. It now uses vh and vw. If your browser is older than IE9, Chrome31 or Firefox 38, you'll get the small box anyway.

    Please let this be the end of these issues. 😄


  • Plugin & Theme Dev

    @a_5mith said:

    Ok, Updated to 0.4.6.

    @exodo You will need to clear your cache, seems some old CSS is still loading, the updated version displays the red play button as it does on a proper youtube embed etc. So if you still see the black one, cache will be your enemy.

    If the videos appear slightly smaller on Desktop, try restarting your forum. I've gone with a slightly different method of calculating width and height. It now uses vh and vw. If your browser is older than IE9, Chrome31 or Firefox 38, you'll get the small box anyway.

    Please let this be the end of these issues. 😄

    will test it tonight , waiting for npm update lol


  • Plugin & Theme Dev

    @a_5mith said:

    Ok, Updated to 0.4.6.

    @exodo You will need to clear your cache, seems some old CSS is still loading, the updated version displays the red play button as it does on a proper youtube embed etc. So if you still see the black one, cache will be your enemy.

    If the videos appear slightly smaller on Desktop, try restarting your forum. I've gone with a slightly different method of calculating width and height. It now uses vh and vw. If your browser is older than IE9, Chrome31 or Firefox 38, you'll get the small box anyway.

    Please let this be the end of these issues. 😄

    not sure if plugin has official post os i write it here

    tested plugin on clean 0.7 and clean 0.8, 3 browsers and mobile, cache cleared etc
    still getting broken youtube previews
    mac and iOS

    something like this
    Captura de pantalla 2015-09-03 a las 6.44.00.png

    console error on load
    Captura de pantalla 2015-09-03 a las 6.50.46.png

    then a hundred errors of this
    Blocked a frame with origin "https://www.youtube.com" from accessing a frame with origin "http://". The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match.



  • The protocol in the plugin uses // rather than a fixed protocol. Does your forum use https:// or http://?



  • 0.4.7, add this to your custom CSS

    .content iframe {
        max-width: 100% !important;
    }
    

    Caveat: Videos don't show the title until clicked, this is because v2 api has been nuked, I'm creating a separate branch to utilise Youtube API v3.

    Will be the next major version.



  • @simonq, chats broken, but use the code above in your custom CSS for now.



  • I am trying to add the above code in customer css, getting warning...as below and youtube side is not responsive in mobile, any pointer /help ? .
    0_1446969242064_upload-03a68d99-52e1-42a6-8c87-1c8aad399314



  • Using important isn't a big issue.



  • Bu this still not solving "YouTube videos are too large on mobile devices" the original problem in this thread. Other than this CSS (and ignore the important warning) , should o do anything else to solve the original problem ?


Log in to reply
 

Suggested Topics

| |