Why did 9gag migrate gifs to html5 video - html5-video

http://9gag.com/gif used to show the animations as gifs, now they are html5 videos. What is the reasoning behind such a decision?

The reason is simply that video compresses better than gif in many cases, particular when the gif is of some size or length.
Additionally, video can be streamed affecting traffic and when the displaying can start (almost right away), gifs has to be loaded completely before they can be shown (ore they will be shown slowly and progressive).
Now that most browsers are able to show video natively, video becomes a viable and desired option to animated gifs.

Related

Accessibility rules for generic lifestyle background video with no audio as it relates to WCAG 1.2.5 Audio Description (Prerecorded)

I think I understand the WCAG 1.2.5 Audio Description (Prerecorded) rule, but what I can't find a straight answer on is if what if the per-recorded background video provides no real value, like if it's just a short video of someone walking on a loop with no talking/audio. Does this rule still apply?
Short Answer
Assuming the video serves no purpose other than decoration then you are safe to hide it with aria-hidden="true".
Longer Answer
While the above is perfectly valid for accessibility, there are other considerations from an accessibility perspective.
Do you provide a way to pause the video? If someone has an anxiety disorder then the video can be distracting so you must provide a way to pause the video. (or you could use the Prefers Reduced Motion media query and use that to stop the video auto playing, however the support is not fantastic at 80%.)
You should also add the muted attribute to indicate that the video has no sound to screen readers.
If the video does provide a purpose (i.e. it emphasises what the company does) then you should add a description to the video using aria-describedby and pointing that to a hidden <div> with a description of the video contents as a minimum.
Final Thoughts
If the video is purely decorative, has no meaning within the page and is there just to 'look cool' perhaps consider replacing it with an image. It will massively help your page load times and so can only help with conversions, video backgrounds hurt more than they help as they take focus away from your call to action.

create js movieclip object containing an mp4 video in a tween does not work with gotoAndPlay calls

I have some code that used CreateJS /EaselJS to create a MovieClip that contains a Tween that contains an mp4 video. In MovieClip there is a method called 'gotoAndPlay' that you can use to change the timeline position of the playhead to a certain frame number. When using this method to change the play position of the video the tweens work but not the Tween that contains the mp4 movie...this object does not load is result in a blank video tag on the page except for the first play through of the clip. Once the mp4 video has been played it didn't play again if the position was set to it through gotoAndPlay...any ideas on how to fix this or if something wrong might be happening?
In ActionScript animations, FLV movies can be locked to the timeline. But in HTML Canvas animations, MP4 movies are not really fully-fledged "Animate" objects. They look the same for the most part but the integration is not as tight as in Flash.
Since the videos exist outside of the Canvas, you'll need to use jQuery or JavaScript to address them. This can be done by using the Code Snippets in the HTML5 Canvas - Components - Video folder.
As an advance warning, "seeking" to different locations in an MP4 video the way you described is not as reliable as it was in Flash. Browsers like Internet Explorer don't handle seeking well and will likely crash. If frame -by-frame accuracy is important, you may find the best visual results by avoiding the video component and converting your movie to an actual MovieClip in Animate CC, which will increase your file size significantly.

Video in video.js-Player not displayed correctly

I have a problem regarding a video that is not displayed correctly in the video.js player:
http://www.ulrichbangert.de/kakteen/zeitraffer_vjs.php?Idx=10
As you can see from the page source the dimensions of the player are set to 640x480. The video has the same dimensions which I verified by loading it into my local player and displaying the properties. But: At the left and the right of the video there is a gap of some pixels. The poster is displayed correctly without these gaps. This results in an ugly skip when the player switches from the video to the poster. The poster image is the last frame of the video.
Other videos like this one
http://www.ulrichbangert.de/orchid/zeitraffer.php?Idx=1
are playing fine without a skip but I can't find any difference between these and the faulty one.
My browser is Firefox 23.0.1 thus the ogv video is used.
Can anybody help?
Best regards - Ulrich

Rendering video on HTML5 CANVAS takes huge amount of CPU

I am using HTML5 Canvas for rendering video, but the rendering is taking huge amount of CPU? I am using GtkLauncher (with webkit 1.8.0) for rendering the video on the Canvas.
Can some one please throw some light on this? Is video rendering on Canvas not efficient for embedded systems?
Also I would like to know, whether there is a way in HTML5 video tag to know the video frame rate, before I actually start to render the data on the Canvas. This I would need to know because I would have to set the timer (used for drawing the video frames) at that same frame rate .
Thanks and Regards,
Souvik
Most likely the video rendering is not accelerated and needs to
Decode on software
Resize on software
You did not give system details so this is just a guess. By poking browser internals you can dig out the truth.
Video framerate cannot be known beforehand and in theory can vary within one source. However if you host file yourself you can pre-extract this information using tools like ffmpeg and transfer the number in side-band (e.g. using AJAX / JSON).

How to display two pages in one scrollview page with zooming from PDF?

I want show per page pdf in portait mode and display two pages when rotate to landscape mode on ipad . I had search on internet and can't find any solution. I thought two possible way.
1.Using webview but I don't know how to display two page in one webview in a webview.
2.Using CGPDF API read from two page and merge to one pdf file. But I think this may be very slow and not sure if this could do it .
or any other way could solve this problem? Thanks!!
I don't think you will have much success with using a UIWebView there. There's however nothing stopping you from putting two CATiledLayers into a UIView and display them next to each other. In fact, that's exactly what I did in my iOS PDF parsing framework.
Just set the contentView as the containerView, that includes both tiled layers, and they work perfectly together. Keep an eye on your memory though, I wouldn't allow them both rendering pdf at the same time, that most likely crashes your app due to low memory. (Drawing a PDF is really resource intensive)