In my project (using the Marmalade SDK), I have fixed the screen orientation to portrait in the .icf file. When a user touches a button, a video plays (using s3e video). However, This video is also played in portrait mode (which is not conducive to viewing), and I want the screen to automatically rotate to landscape and have the video take up the entire screen when the button is pressed.
Any help would be greatly appreciated!
You may want to take a look at the s3eSurface API: http://api.madewithmarmalade.com/group__surfaceapigroup.html#ga70a312268193e75b29451da071c87ead
I guess something like s3eSurfaceSetInt (S3E_SURFACE_DEVICE_ORIENTATION_LOCK, S3E_SURFACE_LANDSCAPE) before playing your video and the same with S3E_SURFACE_PORTRAIT will do the trick :)
Related
New to JavaFx.
I have managed to open a window that plays automatically a small video clip.
Once video clip finished, I would like the program to display the regular background.
So far no luck and frankly stuck with no idea.
Thank you
J
I have a window displaying a video stream with a twitter feed as an overlay.
When a new tweet is displayed, the current tweet animates out using a rotate animation and the next tweet is rotated into view. The animations are performed using a RotateTransition.
The app also switches between different cameras to display different streams. To give an indication of when the app switches to the next camera, I have a progressbar that fills using a Timeline object.
This works well, until I resize the window. The rotate animations start to flicker, along with the progressbars as they gradually fill.
As a test, I disabled the video stream, to see what's happening. The 'artifact' doesn't occur then and I can resize as much as I want. If I play the stream and don't resize, everything works well.
The video player is based on VLCJ, but the actual pixels are drawn on a WritableImage in an Imageview.
See the following images that illustrate the problem.
At the bottom right you can see 2 different progress bars (a ProgresBar and a ProgressIndicator).
A part of the flickering result is still visible below the second image. It somehow stays visible, probably because the area doesn't get redrawn.
Any idea what makes the flickering happen? Is there anything I can do to fix or avoid this?
I tried some VM options in IntelliJ: -Dsun.java2d.d3d=true -Dprism.forceGPU=true to somehow enable hardware acceleration, but that doesn't seem to help.
Disabling the progressbar fill animation doesn't help either.
I had a similar problem with some arcs and shapes that would flicker when its attributes / sizes were changed.
The solution to my problem was to make sure that the methods used to change the shapes were called from inside the JavaFX thread.
Platform.runLater(() -> {
arc.setStartAngle(30);
arc.setLength(45);
}
I have a video playing in a UICollectionView cell, basically a UIWebView embed with a youtube link. When i click on another cell which goes to another view, the video is still playing in the background. Since I have so many cells, its really hard to keep track of the video playing. Also when you tap a cell with a UIWebVIew (embed youtube video) it doesn't really detect the didSelectItemAtIndexPath.
Any suggestions would be helpful thanks!
Two thoughts.
Checkout NSNotificationCenter, you can maybe create an event when you press play and then watch for it.
https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSNotificationCenter_Class/Reference/Reference.html
Another option is to not play the video in the collection view, but rather segue to another view that plays the video. I'm not sure if this is too different from the functionality you want, but it seems simpler.
I am currently programmatically enabling fullscreen in an OS X 10.7+ app, via the techniques described in this apple guide, that uses OpenGL to renderer its views. Is it possible to enable per-frame screen updates during the full screen animation? Currently, it seems like a screenshot is taken before and after fullscreen is entered and there is an automatic alpha fade between the two.
I would like to instead redraw the content at every frame so that there is a smooth fade between the two sizes.
You probably want to look at the Custom Full-Screen Presentation Animations section in NSWindowDelegate documentation
I am using three20 to present a photo essay of a story I made after the February earthquake in Chile. I would like the app to display portrait type images when iPad device is in portrait orientation and landscape type images when iPad device is in landscape orientation.
So there would be two versions of every image, one cropped for portrait viewing and one cropped for landscape viewing and the app would show the version that is appropriate for the orientation the device is in.
I will crop these image versions separately. That way, the app would make full use of the screen in all orientations and users will read the story like a magazine.
Ideally, the view would change over to the corresponding image, staying where it is in the sequence of images, when the user rotates the device, so from portrait #4 to landscape #4 and vice versa, for example. But, if this is not possible, jumping back to the first image whenever iPad device is rotated is acceptable as well (push to separate TTImageViews maybe?)
The idea is to give to user the experience he is reading an illustrated story in all orientations. Can this be done? If so, can you give some clues?
If it can not be done putting a specific image in the background with the image viewer overlaying it may also be a solution. If separate fullscreen views for each orientation are not possible, then at least I would like to get rid of the black "autoresizing mask" parts of the screen..
Many thanks!
diederik