3 Replies Latest reply on Aug 14, 2018 10:12 PM by Jonathan Block

    Controlling Embedded Jive Video's Height and Width? what is the default?

    james1.hicks

      I am making an add-on that is a basic UI that pulls in videos from a particular space. I am embedding the video based on the download options depending on selected video. I am targeting a specific resolution in the downloadOptions with the hope of having consistency across all videos because I noticed when I grabbed the url with the 'source' displayName that there didn't seem to be a standard size.

       

      Still, even when grabbing the same resolution for all videos (targeting the 480 vresultion for example)  I have some videos that have a larger height and width and once loaded, causes the some of the content below to go outside of the iframe. I could use adjustHeight but I still don't want the video sizes to vary between each other that they affect the UI.

       

      Any ideas?

        • Re: Controlling Embedded Jive Video's Height and Width? what is the default?
          jgoldhammer

          Hi James,

          Can you share code?

          In general the video element can be made responsive adapting to the width.


          I have included videos in our latest news tile development and It works great...


          Thanks

          Jens

            • Re: Controlling Embedded Jive Video's Height and Width? what is the default?
              james1.hicks

              Not sure what code needs to be shared for this, I have a video tag who's src is being populated dynamically based on clicks (user clicks on a video title, which sends a request to that video's downloadOptions url in API, grabs the url - which for me is the same resolution url for everyone).

               

              video tag:

              <video id="video" controls src={videoPlaying.video} width="100%" height="auto"/>

              I am doing this not in a tile but in a custom add on/app. I'm not applying any styling to the video other than the above. Seems strange that some videos would have different dimensions from each other when 1. the same resolution downloadUrl is being used.

                • Re: Controlling Embedded Jive Video's Height and Width? what is the default?
                  Jonathan Block

                  I have no idea how Jive/Aurea/their 3rd-party video provider is handling this in particular, but there are multiple ways a video platform can convert an original video to other sizes.  You may need to do some testing with different sized and initial-aspect-ratioed original videos to see how exactly they do it.

                   

                  Some resample to the largest rectangle that fits within a predefined containing rectangle (perhaps 800x600), relying on black bars to pad out the extra space if the original aspect ratio doesn't match the expected target.  Some resample to a fixed height or width, and the aspect ratio of the original governs how large the overall video becomes (perhaps 800x[whatever it calculates to preserve the aspect ratio]).  If the video is smaller than some of their target dimensions, they may resample it up to the larger size, or they may just copy the smaller original to the should-be-larger version without enlarging it.  It's also possible their conversion routines are just a bit sloppy, or at least follow some unexpected rules that made sense to them at the time.

                   

                  For best results, you probably do want to specify a dimension for your player, and just check that it will scale anything that doesn't fit exactly while preserving the source aspect ratio.  You could also center a fixed-dimension player within a 100%-width DIV, and let it resize horizontally as needed to fit each video while maintaining a constant height.  Don't let it stretch the video to fit the player's fixed aspect ratio, or you'll get people and shapes stretched or squashed out of proportion and it may be hard to watch as a result.