Startup up Scene samsung TV app - samsung-smart-tv

I have create an Samsung TV App, for that I have created two scenes: Initial Scene and MainScene
So when the user launches my application I want that my InitialScene shows for 1 to second, then MainScene should show.
How to achieve that?

you should set a timer, after that try to change the focus on the MainScene just like this:
`
MainScene.load();
MainScene.show();
MainScene.focus();
InitialScene.unload();
`
hope this will help

Related

AVPlayer music stops when going to other view

im making a radio app and I have a swrevealviewcontroller with 3 views
picture:
enter image description here
this is the code of my first view, in trying to play music from a link with AVPlayer.
code:
I can start and stop the music from playing with this code but
when I open the menu and click on a menulink my music stops playing.
I cannot find a solution for this, I have already added the bacground mode in capability.
btw every view controller already has one class assigned to it.
can somoene pls help me
Your AVPlayer variable is located within the class. So when you leave that viewcontroller - that variable no longer exists. Make it global (outside of the class) and that should work just fine.
everything is working now by adding the player and the functions outside of the class, so now it's a global player with functions to start and play it

Unity3d ARKit not reset

I am using vuforia & ARKit sdk in my application.
I have two buttons ( Vuforia & ARKit buttons)
My app work flow:
Open the app
Clicked on “vuforia AR” button (1st time)
If marker found Vuforia AR works.
i am switch to “ARKit” 1st time, it will be working fine.
If we press back button, it will redirect to MainScreen
Again Click on “vuforia AR” button (2nd time)
Vuforia working good.
If we switch to “ARKit” , ARKit Camera is not resetting .
Here arkit camera is freezing.
Note: both SDK are using single scene and I tried two different scenes also. My issue is not resolved.
Don't know if you solved your problem.
If not, did you tried to reset your ARKit scene ?
Here's a sample code I founded in another post. Working fine for me to reset my ARKit Session.
public void ResetScene()
{
ARKitWorldTrackingSessionConfiguration sessionConfig = new ARKitWorldTrackingSessionConfiguration(UnityARAlignment.UnityARAlignmentGravity, UnityARPlaneDetection.Horizontal);
UnityARSessionNativeInterface.GetARSessionNativeInterface().RunWithConfigAndOptions(sessionConfig, UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors | UnityARSessionRunOption.ARSessionRunOptionResetTracking);
}
Don't forget to change sessionConfig parameters with yours ! ;)

PBJVision switch to front facing camera

Hi I am trying to switch between the rear and front facing cameras if i start he session with the front facing camera it works but with the other way way round the AVCapturepreview layer is not visible and just presents a blank screen.
First stop the preview session.
When stopped (use the delegate for this) set the camera device you want and restart the preview session.
In code:
[[PBJVision sharedInstance] stopPreview];
//implement the following deluge ate
- (void)visionSessionDidStopPreview:(PBJVision *)vision{
vision.cameraDevice = PBJCameraDeviceFront;
[vision startPreview];
}

simple custom video player for ios

I am developing an app in which I wanna show the tutorial on how to use the app. For that need a custom video player which should look simple with a single play/pause button, a seeker and a stop button.
I have tried some video players like "videoplayerkit". To use this videoplayerkit I have to install cocoapods(libpods.a). It would be very helpful if anyone help me with a custom third party video player that satisfies my need. In short I need something like this in the picture below
You can try out an example app I created if you would like to see an example of a custom movie player, the Xcode project is at AVSync. This movie player looks exactly like the default iOS movie player, but you can have a look at the code to see how a custom set of controls can be made to control a movie player underneath. This example sits on top on a custom movie library, but the basic idea of creating your own controls and having them submit actions is the same no matter how you implement it.

stop background music in a different scene in cocos2d

how to stop the background music in different scenes in cocos2d.Like in enabled sound option if we press "no" option the background music in another scene will stop and "yes" option will also do the same task. please help me i am new in cocos2d game development
Declare player and also set one variable or flag in app delegate class. By the help of this you can easily check it in any class of your application. So in scene where you want to stop your music, set your flag false and stop player....