I wrote a very simple video player as below:
from kivy.app import App
from kivy.uix.screenmanager import Screen
from kivy.uix.videoplayer import VideoPlayer
class VideoScreen(Screen):
def __init__(self, **kwargs):
super(VideoScreen, self).__init__(**kwargs)
self.video = VideoPlayer(source='test.mp4', state='play',
options={'allow_stretch':True,
'eos': 'loop'})
self.add_widget(self.video)
class MyApp(App):
def build(self):
return VideoScreen()
if __name__ == '__main__':
MyApp().run()
It works fine at my Mac machine. Then I packaged it using this command:
toolchain create video_test /Users/haipan/python/kivy/video_test/
Which generated Xcode project: video_test.xcodeproj in a folder video_test-ios/
Then I double click video_test.xcodeproj, then Xcode launched, then I click the arrow button, then Xcode shows Build Successfully, then its Simulator launched, my app is there, video player seems there too, but no video playing. The error message as below:
Got dlopen error on Foundation:
dlopen(/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation,
0x0001): tried:
'/Users/haipan/Library/Developer/Xcode/DerivedData/video_test-drwhokvsjnzjuqblihyyhobprqov/Build/Products/Debug-iphonesimulator/Foundation.framework/Versions/Current/Foundation'
(no suchfile), ...
I have tried audio files and pictures, they all loaded fine. But I could never load any video. Did anybody get video running by Kivy app? Does Kivy really support video playing?
Thank you in advance for any help.
Related
I have a small app that I am using to find out my my main app does not show the launchscreen correctly.
The launchscreen has an image ( modified screenshot of the app) but I only see a white screen.
I would be happy to use debugger but am not able to do a step into at the start and the only code location I can find to put a breakpoint in is after the launchscreen has been processed.
Can anyone help me with a hint as to where I can get the debugger to give me control at the start of the app.
I can run it on simulator or attached real phone via Xcode 14 on Monterey 12.6.3.
p.s. I have posted a similar question on the apple developers forum and had no responses.
I have so failed to find any way to discover why the launch screen does not display correctly.
I am on OSX 12.2, and XCode 13.2.1. I created successfully a Command-line tool app written in C++ and wxwidgets library to add the GUI interface. I inserted the images for the app icon in Images > AppIcon, see the screenshot attached. However, when I run the app there is a 'blank' icon as shown in the second screenshot attached.
How may I get the desired icon to appear ?
Thanks!
I have been using the following code to show when I created the package (Android Studio)
val pInfo: PackageInfo = this.getPackageManager().getPackageInfo(this.getPackageName(), 0)
val versionDate = pInfo.lastUpdateTime
val versionDateAsString = SimpleDateFormat("dd/MM/yy HH:mm:ss").format(versionDate)
Toast.makeText(this, "Package Created $versionDateAsString", Toast.LENGTH_LONG).show()
The above code snippet works perfectly for packages loaded onto my Ticwatch 3 (running Wear OS 2)
Unfortunately it does not work when the same package is loaded onto my Samsung Watch4 (Wear OS 3). Instead it shows the first time the package was loaded?
UPDATE 1:
It appears this is expected behaviour - The old date is returned when the code is run on an emulated Wear device.
Notes
Even cleaning and rebuilding the entire package still results in the emulator showing the time and date the package was first run on the emulator.
The emulator is set to API 30 and I admit I have not tested on an emulator running API 28 (I want the date to show on the Galaxy Watch4)
Frustrating!
I am creating a Cocoa app, and when I import #2x images into my project, no image shows up in the app at all. I am using a non-Retina MacBook Pro.
If I have an image, such as image.png, it shows up correctly.
When I import image#2x.png into the project, no image shows when the app is run (even the normal image).
When I change image#2x.png to image#2xx.png (or some other name), the image shows up again. However, now I can't show the image on a Retina device.
Am I not handling Retina images correctly?
You need to include the image.png AND the image#2x.png in your project. Also make sure that when you load the files you do not include the .png extension.
I am a newbie in Mac development as I am trying for the first time to port my iPhone app on mac.
This might look a silly question to all experienced developers but please be fair with me as I don't know much about Mac programming.
I started a new project on mac and it was all good.The application was opening and I could see the window opened.
As I wanted to implement a movie player I followed Simple Movie Player Tutorial by Apple and after that tried to open the app.Now when app launches I can't see window of the application.I need to open a video from File menu which makes the application window to appear.I want the window to appear right at the app launch!
Please help as all my search got in vain and I strongly feel that this is the right place to get the right direction.
Thanks!
That appears to be the way that particular app works. It requires a movie file. There's no such thing as a new, untitled document for that app. From the bottom of the page you linked to: "When the player launches, you can open and play any QuickTime movie of your choice. Simply locate a .mov file and launch the movie from the File > Open menu in your media player application."
It appears that the recorder application that you will build in later steps of the tutorial opens a window at launch.
One other thing to be aware of: as of Lion, due to the application resume feature, launching an app will not always open a new, untitled document. Lion will try to restore the application to the state it was in when you quit it. Since this tutorial was written before that feature existed, it doesn't have explicit support for it.