Red5 cannot display video in Adobe AIR - air

I have an Adobe AIR application that I am using to stream some video using RED5. The AIR application has the following Flex code:
<s:VideoDisplay id="vidBox" autoPlay="true" autoRewind="true" x="6" y="11" width="95%" height="90%" scaleMode="zoom">
<s:source>
<s:DynamicStreamingVideoSource host="rtmp://localhost/TestMovie" streamType="recorded">
<s:DynamicStreamingVideoItem streamName="2hourmovie.flv" />
</s:DynamicStreamingVideoSource>
</s:source>
</s:VideoDisplay>
When I run the Air Application, I am seeing a rather pretty set of flickering and changing colors instead of the movie. The sound, amazingly, comes through very well.
I use the exact same code in a web- based application, and the movie plays without problems. I see picture and sound and all is well.
I suspect that there is something wrong with AIR that is screwing up the picture, or perhaps I am interacting with AIR in a less- than- correct manner? Or I have found a bug in either AIR or RED5?
Someone please advise. I am using Red5 v1.0.1, Adobe AIR v3.7, and am developing in Flex Builder 4.6.
UPDATE:
More information about this problem: It appears to occur only with very large FLV files. I included some 1- hour movies in my streams directory and ran the AIR application, and the movies displayed without problems. Other files of longer length have the same display failure. Note that the failure does not occur in the web browsers, regardless of FLV file size.
Apparently, AIR has some limitation that prevents it from properly displaying FLVs beyond a certain length. Either that, or an AIR application must handle longer FLVs differently from shorter ones. I am uncertain and cannot find any documentation on this matter.
I am working to narrow down how large a file is required to make an AIR video object fail.
Have I found a bug in Adobe AIR? Or is there some coding or configuration I need to adjust in order to make a viewer work properly with larger FLV files?
Someone please advise...

Related

dojox.av.FLAudio and Adobe flash player

Our application use dojox.av.FlAudio to load and play a mp3 file. This was tested years back. Recently, when we tested this feature, it is not working in any of the browsers. Want to know if dojox.av.FlAudio requires Adobe flash player to play the mp3 file. As Adobe flash player is no longer supported by browsers, Will it be having any impact using dojox.av.FlAudio.
Yes, dojo.av.FIAudio uses Adobe Flash (swf) to play sounds. See documentation about htis. I'm sure you could replace it with the standard HTMLAudioElement element. This work acros all browsers now. See here for more information.

Issue with sap.m.PDFViewer (1.48) on mobile devices

I am developing a Master-Detail application which should show an embedded PDF in its detail view. The project is based on UI5 version 1.48, so the new PDFViewer control can be used.
In desktop mode, everything works as expected:
But on a mobile screen, PDF is not showing properly:
The data source property binding at the PDFViewer is done by OData path.
<FlexBox id="fbPDFViewer"
direction="Column"
renderType="Div"
class="sapUiSmallMargin">
<PDFViewer id="idPDFViewer"
source="{myModel>/myPDFUrl}"
title=""
busy="true"
showDownloadButton="false"
height="700px"
width="95%"
loaded="onPDFLoaded"
errorMessage="{i18n>notFoundText}"
errorPlaceholderMessage="{i18n>notFoundText}">
</PDFViewer>
</FlexBox>
Even the SAP sample for embedded usage doesn't work on mobile devices.
According to the source code (1.48), the viewer renders its PDF document directly in the app / iframe only when ..:
The source is valid
It's coming from the same domain
It has a valid URI format
UI5 thinks the user is using a desktop computer (Device.system.desktop returns true) or the displayTypeapi, available since 1.58, is set to Embedded.
UI5 detects that the user agent (browser) has a certain type of PDF plugin enabled. Currently, there are no known mobile browsers which support displaying PDF documents directly in the page.
The steps 2 and 3 explain why the PDF is not rendered on a mobile device even if the source is valid. In such cases, I guess the only option is to provide a download option instead of trying to render the PDF forcefully in the mobile app.
You can use nabi.m.PDFViewer from the the nabi.m library. It works cross device, even on iOS (where you typically don't have the adobe PDF plugin). For details see https://github.com/nzamani/ui5-nabi-m
There you will find also how to try it out on localhost. I have also added some detailed instructions for deployment of the library to NW ABAP as well as SAP CP.
You can find live demos at http://ui5lab.io/browser/#/Samples/nabi.m/Sample/nabi.m.PDFViewer.PDFViewer and http://ui5lab.io/browser/#/Samples/nabi.m/Sample/nabi.m.PDFViewer.InPagePDFViewer
Open the two links on your iOS device or any other device to see how it looks like.
On mobile devices (smartphones and tablets), the PDF viewer control renders a toolbar with the title and a download icon, which behaves as a standard device/browser file link. We've made this note in Fiori Design Guidelines 1.48 and we'll add it to the SDK documentation.
(More in openui5 issue 1759 on GitHub)
Thank you for your responses and hints...
Installing an Adobe Acrobat viewer on the mobile devices was not an option here.
Source of the PDF had same domain like app itself and had a valid URI format too
Due to project timeline in meantime I decided to fall back to a solution that SAP provided with it's "Paystub" (Fiori 1.0). Therein they're using a 3rd-Party control for displaying PDF's which unfortunately has an overhead of code and implementations steps but it works (with minor issues only) perfect on desktop devices as well as on mobile devices.
So far, this is workaround solved my requirement.
Thanks.

App crashes on iOS (Phonegap) if multiple images are captured from camera

I am developing Phonegap Application and my application has scenarios where camera is used very frequently.
In my application I have used custom camera plugin (https://www.npmjs.com/package/cordova-camera-custom) to take picture and use it in my application.
Now when I capture images from this camera 30 times by opening camera and capturing again and again the app goes to crash.
The app just crashes so I am not able to identify the root cause of the crash.
I am not an iOS Programmer though I have tried to check the plugin code but I was not able to find the cause.
You can even check the plugin code on your end if needed.
I have also posted this issue to DevExtreme, the framework which I am using to develop hybrid applications at following link:
https://www.devexpress.com/support/center/Question/Details/T480068
and they found that issue indeed is related to memory shortage. The error message was with bug_type: 298 and fault cause: vm_pageshortage.
Please help me on this, I am struggling on it since long before.
Any Help is greatly appreciated.

JPEG RAW images not displaying in Safari on MacOS Sierra or iOS 10

We've recently had some users of our app report that JPEG images aren't displaying properly since they updated to iOS 10.
We've looked into it and found that some JPEG images do work OK, and some don't. There are no errors logged anywhere.
The ones that don't work in our app also don't work in Safari on iOS 10. Not only that, but they also don't work in Safari on MacOS Sierra.
So we've checked the files themselves out and found that the files that don't work begin ÿØÿÛ, while the others that do work OK begin ÿØÿá.
Googling these signatures led us to this page: https://en.wikipedia.org/wiki/List_of_file_signatures
Here it states that the images that aren't working are JPEG Raw, as opposed to JFIF or Exif format JPEGs.
So the question is: Why does this no longer work, and what's the best solution to work around it? I don't want to have to re-encode the images because of the lossy nature of JPEGs. We also can't get the source of these images to change, unfortunately.
We've considered a solution for our app, but that won't solve the problem in Safari.
There's always the wonder of why have Apple removed support for this format?

Adobe AIR can't show Flash embedded in HTML?

of all three choices (AIR+AJAX, +Flash, and +FLEX) I went on the AJAX route. But it seems that it can't show Flash embedded in HTML (using the traditional OBJECT tag).
Is it by design? or my fault?
i think it's your fault. there are a number of air "web browsers" and they all can display flash just fine.
google for some. i found one here and it gives the source code as well
I've found the culprit: my window is transparent.
According to adobe, SWF and PDF won't be displayed if transparency is used.
I don't know much about Ajax but i do know the preferred method to embed flash into html is to use swfobject. have you tried that yet?