Discussion Forums  >  Uncategorized

Replies: 8    Views: 316

samme71
Apple Fan
Profile
Posts: 29
Reg: Apr 10, 2011
South Carolina,...
3,840
01/10/12 02:05 PM (14 years ago)

Auto rotate video playback.

Just a little background.I have built home screen using a background image with buttons drawn in and a clear menu list overtop of the background for a custom button look. This has caused a little issue with rotation. On the screen I have not allowed scrolling so the menu lists and the button graphics do not become miss aligned. That also means I have had to lock the rotation as well. I am also using another screen with RSS feed list for video stream that loads video data automatically to the list. with the rotation locked video playback is currently only portrait, I want to auto change the orientation of the video playback to landscape for better viewing. Is there a way to force landscape video playback? I can get around in Xcode a little, I just need help getting pointed in the right direction, or even a quick solution using another method.
 
PSMDanny
Apple Fan
Profile
Posts: 1166
Reg: Dec 09, 2011
Heerlen
21,940
like
01/10/12 03:46 PM (14 years ago)
Hi Samme71, I subscribe to this topic because we're in the same boat. Orientation locked will play video's also in portrait mode. Is there a way we can set the orientation per screen? How to edit the code? Thanks in advance. best Regards, Danny
 
PSMDanny
Apple Fan
Profile
Posts: 1166
Reg: Dec 09, 2011
Heerlen
21,940
like
01/10/12 04:25 PM (14 years ago)
Hi, Investigating this issue and thought that I could solve it. What I'm trying to do is to allow rotation for a specific screen. Doing this with an if construction in BT_rotatingNavController.m see line 62 -- look for the itemid and if it meets that specific itemid canRotate=TRUE This is what I did so far: //should we prevent rotations on small devices? if([appDelegate.rootApp.jsonVars objectForKey:@allowRotation]){ if([[appDelegate.rootApp.jsonVars objectForKey:@allowRotation] isEqualToString:@largeDevicesOnly]){ canRotate = FALSE; if([[appDelegate.rootApp.jsonVars objectForKey:@itemId] isEqualToString:@9F293B8A2FD3BE1715ABC5D]){ canRotate = TRUE; I added this line (as seen within my code above): if([[appDelegate.rootApp.jsonVars objectForKey:@itemId] isEqualToString:@9F293B8A2FD3BE1715ABC5D]){ canRotate = TRUE; UNFORTUNATELY this doesn't work but could someone give a hint to produce the solution. In the meantime I'll investigate further and come up if I have any news on this. best Regards, Danny
 
chadh0130
Apple Fan
Profile
Posts: 352
Reg: Nov 05, 2011
Rhode Island
4,020
like
01/10/12 05:17 PM (14 years ago)
Hey Guys- I am having the same problem right now for both the iphone and ipad. I've locked my application in portrait only which causes the videos to remain in portrait as well. I was looking around the xcode files and noticed there isn't a file named BT_screen_video. If you look at the BT_viewControllerManager.m file line 318. It talks about configuring videos. However, my question is, how come there is no BT_video files in my project source code?
 
PSMDanny
Apple Fan
Profile
Posts: 1166
Reg: Dec 09, 2011
Heerlen
21,940
like
01/10/12 05:25 PM (14 years ago)
Hi, Hope David or someone else comes with a solution. The code you are refering to is for the youtube plugin that isn't (yet) included in the bt-server edition. Best Regards, Danny
 
samme71
Apple Fan
Profile
Posts: 29
Reg: Apr 10, 2011
South Carolina,...
3,840
like
01/10/12 09:12 PM (14 years ago)
Hey Danny & pikpocket, Looks like this might be a common request. Danny, nice try with the code, I'm sorry that didn't work for you. I was thinking along the same lines about just adding the rotate command. I figured it could be added after the command was given to launch the native video player, but I couldn't find it in the code. I hope someone smarter than me can come along and throw us a rope. Good luck to us all, and thanks guys. Mike
 
PSMDanny
Apple Fan
Profile
Posts: 1166
Reg: Dec 09, 2011
Heerlen
21,940
like
01/11/12 02:00 AM (14 years ago)
Hi all, Hope that a solution comes up. My code example, thinking about it, was not good. Because if that would work the whole app would have the option to rotate. The approach was good. Now we have to find out how and where that code should be placed. This is a call for all geniuses!!!! Best Regards, Danny
 
mleonard
Apple Fan
Profile
Posts: 124
Reg: Nov 01, 2011
Conway,AR
1,940
like
02/23/12 08:52 AM (13 years ago)
Would love a solution to this as well! I really don't want to enable rotation globally for my app as it conflicts with my design.
 
basement
Aspiring developer
Profile
Posts: 488
Reg: Apr 07, 2011
Ontario
4,880
like
06/22/12 12:21 PM (13 years ago)
fixed this. It's quite easy really. Open the video in Quicktime 7x* (Not the version that comes with Lion, cos it's crap). Export to iPhone format (export to web), and it'll create a nice small video that will play in landscape mode, and the rest of your app will stay in portrait mode. * mine is QuickTime Pro. I don't know if the pro version is required to rotate and export like this.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.