Giter VIP home page Giter VIP logo

videoplayercontainer's People

Contributors

jacklandrin avatar shayanbo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

videoplayercontainer's Issues

Is it possible to have just one Context that could be used by multiple PlayerWidget?

Great widget!

Imagine an app screen with a List with 10 empty PlayerWidget (replaceCurrentItem was not called!) . Each empty PlayerWidget has assigned a String that stores the associated video Url. Then I can request to play any of the PlayerWidget one at a time.
In my implementation each PlayerWidget is created by passing a separated instantiated Context. When I want to play the first video, for example, I use the replaceCurrentItem method for the Context associated with the first PlayerWidget. Hence, If I want to present 10 empty PlayerWidgets ready to be played I have to instantiate 10 Context and pass each of them to the PlayerWidget related object.
My question is: Can I have 10 or 100 empty PlayerWidgets and have just one Context that is changed and assigned (during runtime) to a specific PlayerWidget to be able to play just that PlayerWidget?

Thank you

app crashes

Thanks to the developer for providing a great lib. I have integrated this lib into my own project. In xcode, I use the "run" function to install it on the real machine without any problem. However, in order to publish to testflight, I use "Product -> Archive", and then install it on the real machine in testflight, the program will crash immediately. I tried TikTok-Example and encountered the same problem. If I use "Archive", do I need some separate configuration?

Device: iPhone 14pm
System: iOS17.3
xcode: Version 15.0.1 (15A507)
macOS: 14.1.1 (23B81)

The code in question:
WX20240129-023837

Here is the complete log:
`Incident Identifier: FF8B58A0-9DEC-4151-B43B-58D5720FE2ED
Hardware Model: iPhone15,3
Process: TikTok-Example [2019]
Path: /private/var/containers/Bundle/Application/6163006F-5B66-4218-A786-B65841D1D00B/TikTok-Example.app/TikTok-Example
Identifier: ai.test
Version: 1.0 (1)
AppStoreTools: 15C5500a
AppVariant: 1:iPhone15,3:17
Beta: YES
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: ai.test [1449]

Date/Time: 2024-01-29 02:22:00.4195 +0800
Launch Time: 2024-01-29 02:22:00.3323 +0800
OS Version: iPhone OS 17.3 (21D50)
Release Type: User
Baseband Version: 2.20.06
Report Version: 104

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Codes: 0x0000000000000001, 0x0000000000000000
VM Region Info: 0 is not in any region. Bytes before following region: 4366647296
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 10445c000-104464000 [ 32K] r-x/r-x SM=COW ...ikTok-Example
Termination Reason: SIGNAL 11 Segmentation fault: 11
Terminating Process: exc handler [2019]

Triggered by Thread: 0

Thread 0 name:
Thread 0 Crashed:
0 ??? 0x0000000000000000 0x0 + 0
1 VideoPlayerContainer 0x00000001044f7bc4 specialized HStack.init(alignment:spacing:content:) + 12 (:0)
2 VideoPlayerContainer 0x00000001044f7bc4 closure #2 in closure #1 in PlayerWidget.body.getter + 48 (PlayerWidget.swift:121)
3 VideoPlayerContainer 0x00000001044eeb48 closure #1 in WithService.body.getter + 112 (Service.swift:65)
4 VideoPlayerContainer 0x00000001044eec28 WithService.WithService.body.getter + 136 (Service.swift:76)
5 SwiftUI 0x0000000198b0b120 ViewBodyAccessor.updateBody(of:changed:) + 1444 (CustomView.swift:62)
6 SwiftUI 0x0000000199acaff8 closure #1 in DynamicBody.updateValue() + 564 (DynamicProperty.swift:453)
7 SwiftUI 0x0000000199acab70 DynamicBody.updateValue() + 664 (DynamicProperty.swift:445)
8 SwiftUI 0x00000001994cdd74 partial apply for implicit closure #1 in closure #1 in closure #1 in Attribute.init(
:) + 32 (:0)
9 AttributeGraph 0x00000001bc69e864 AG::Graph::UpdateStack::update() + 512 (ag-graph-update.cc:578)
10 AttributeGraph 0x00000001bc695514 AG::Graph::update_attribute(AG::data::ptrAG::Node, unsigned int) + 424 (ag-graph-update.cc:719)
11 AttributeGraph 0x00000001bc694dec AG::Graph::input_value_ref_slow(AG::data::ptrAG::Node, AG::AttributeID, unsigned int, unsigned int, AGSwiftMetadata const*, unsigned char&, long) + 720 (ag-graph.cc:1429)
12 AttributeGraph 0x00000001bc694980 AGGraphGetValue + 228 (AGGraph.mm:701)
13 SwiftUI 0x00000001993c533c DynamicViewContainer.view.getter + 48
14 SwiftUI 0x00000001993c55cc DynamicViewList.updateValue() + 392 (DynamicView.swift:147)
15 SwiftUI 0x00000001994cdd74 partial apply for implicit closure #1 in closure #1 in closure #1 in Attribute.init(:) + 32 (:0)
16 AttributeGraph 0x00000001bc69e864 AG::Graph::UpdateStack::update() + 512 (ag-graph-update.cc:578)
17 AttributeGraph 0x00000001bc695514 AG::Graph::update_attribute(AG::data::ptr
AG::Node, unsigned int) + 424 (ag-graph-update.cc:719)
18 AttributeGraph 0x00000001bc694dec AG::Graph::input_value_ref_slow(AG::data::ptrAG::Node, AG::AttributeID, unsigned int, unsigned int, AGSwiftMetadata const*, unsigned char&, long) + 720 (ag-graph.cc:1429)
19 AttributeGraph 0x00000001bc694980 AGGraphGetValue + 228 (AGGraph.mm:701)
20 SwiftUI 0x0000000199259cf0 specialized implicit closure #1 in closure #1 in closure #1 in Attribute.init(
:) + 168 (:0)
21 AttributeGraph 0x00000001bc69e864 AG::Graph::UpdateStack::update() + 512 (ag-graph-update.cc:578)
22 AttributeGraph 0x00000001bc695514 AG::Graph::update_attribute(AG::data::ptrAG::Node, unsigned int) + 424 (ag-graph-update.cc:719)
23 AttributeGraph 0x00000001bc694dec AG::Graph::input_value_ref_slow(AG::data::ptrAG::Node, AG::AttributeID, unsigned int, unsigned int, AGSwiftMetadata const*, unsigned char&, long) + 720 (ag-graph.cc:1429)
24 AttributeGraph 0x00000001bc694980 AGGraphGetValue + 228 (AGGraph.mm:701)
25 SwiftUI 0x00000001988dd104 DynamicLayoutViewAdaptor.updatedItems() + 68 (DynamicLayoutView.swift:166)
26 SwiftUI 0x0000000198525664 specialized DynamicContainerInfo.updateItems(disableTransitions:) + 68 (DynamicContainer.swift:468)
27 SwiftUI 0x000000019852455c specialized DynamicContainerInfo.updateValue() + 400 (DynamicContainer.swift:326)
28 SwiftUI 0x000000019879a24c partial apply for specialized implicit closure #1 in closure #1 in closure #1 in Attribute.init(:) + 24 (:0)
29 AttributeGraph 0x00000001bc69e864 AG::Graph::UpdateStack::update() + 512 (ag-graph-update.cc:578)
30 AttributeGraph 0x00000001bc695514 AG::Graph::update_attribute(AG::data::ptr
AG::Node, unsigned int) + 424 (ag-graph-update.cc:719)
31 AttributeGraph 0x00000001bc694dec AG::Graph::input_value_ref_slow(AG::data::ptrAG::Node, AG::AttributeID, unsigned int, unsigned int, AGSwiftMetadata const*, unsigned char&, long) + 720 (ag-graph.cc:1429)
32 AttributeGraph 0x00000001bc694980 AGGraphGetValue + 228 (AGGraph.mm:701)
33 SwiftUI 0x0000000198dac608 DynamicPreferenceCombiner.info.getter + 96 (DynamicContainer.swift:0)
34 SwiftUI 0x0000000198dac778 DynamicPreferenceCombiner.value.getter + 60 (DynamicContainer.swift:877)
35 SwiftUI 0x0000000198399410 implicit closure #1 in closure #1 in closure #1 in Attribute.init(
:) + 316 (:0)
36 AttributeGraph 0x00000001bc69e864 AG::Graph::UpdateStack::update() + 512 (ag-graph-update.cc:578)
37 AttributeGraph 0x00000001bc695514 AG::Graph::update_attribute(AG::data::ptrAG::Node, unsigned int) + 424 (ag-graph-update.cc:719)
38 AttributeGraph 0x00000001bc694dec AG::Graph::input_value_ref_slow(AG::data::ptrAG::Node, AG::AttributeID, unsigned int, unsigned int, AGSwiftMetadata const*, unsigned char&, long) + 720 (ag-graph.cc:1429)
39 AttributeGraph 0x00000001bc694980 AGGraphGetValue + 228 (AGGraph.mm:701)
40 SwiftUI 0x0000000199cc27d4 IncrementalPreference.value.getter + 404 (IncrementalLayout.swift:2600)
41 SwiftUI 0x0000000198399410 implicit closure #1 in closure #1 in closure #1 in Attribute.init(_:) + 316 (:0)
42 AttributeGraph 0x00000001bc69e864 AG::Graph::UpdateStack::update() + 512 (ag-graph-update.cc:578)
43 AttributeGraph 0x00000001bc695514 AG::Graph::update_attribute(AG::data::ptrAG::Node, unsigned int) + 424 (ag-graph-update.cc:719)
44 AttributeGraph 0x00000001bc69cb5c AG::Graph::value_ref(AG::AttributeID, unsigned int, AGSwiftMetadata const*, unsigned char&) + 288 (ag-graph.cc:1201)
45 AttributeGraph 0x00000001bc69fa90 AGGraphGetWeakValue + 388 (AGGraph.mm:735)
46 SwiftUI 0x000000019993bfec GraphHost.updatePreferences() + 48 (GraphHost.swift:773)
47 SwiftUI 0x0000000198fabd50 ViewGraph.updateOutputs() + 280 (ViewGraph.swift:614)
48 SwiftUI 0x0000000199a2aa88 closure #1 in ViewRendererHost.render(interval:updateDisplayList:) + 2420 (ViewRendererHost.swift:235)
49 SwiftUI 0x0000000199a283c8 ViewRendererHost.render(interval:updateDisplayList:) + 420 (ViewRendererHost.swift:0)
50 SwiftUI 0x0000000199a989b0 _UIHostingView.layoutSubviews() + 332 (UIHostingView.swift:1096)
51 SwiftUI 0x0000000199a98a10 @objc _UIHostingView.layoutSubviews() + 36 (:0)
52 UIKitCore 0x00000001966fdc04 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1528 (UIView.m:20026)
53 QuartzCore 0x0000000195b107ec CA::Layer::layout_if_needed(CA::Transaction*) + 500 (CALayer.mm:10815)
54 QuartzCore 0x0000000195b10374 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 144 (CALayer.mm:2597)
55 QuartzCore 0x0000000195b16860 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 464 (CAContextInternal.mm:2792)
56 QuartzCore 0x0000000195b0fb80 CA::Transaction::commit() + 648 (CATransactionInternal.mm:432)
57 UIKitCore 0x00000001969e6de0 __34-[UIApplication _firstCommitBlock]block_invoke_2 + 36 (UIApplication.m:12127)
58 CoreFoundation 0x00000001944d5138 CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 28 (CFRunLoop.c:1805)
59 CoreFoundation 0x00000001944d392c __CFRunLoopDoBlocks + 356 (CFRunLoop.c:1847)
60 CoreFoundation 0x00000001944d182c __CFRunLoopRun + 848 (CFRunLoop.c:2957)
61 CoreFoundation 0x00000001944d13f8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
62 GraphicsServices 0x00000001d7a7f4f8 GSEventRunModal + 164 (GSEvent.c:2196)
63 UIKitCore 0x00000001968f78a0 -[UIApplication run] + 888 (UIApplication.m:3685)
64 UIKitCore 0x00000001968f6edc UIApplicationMain + 340 (UIApplication.m:5270)
65 SwiftUI 0x0000000199308898 closure #1 in KitRendererCommon(
:) + 176 (UIKitApp.swift:51)
66 SwiftUI 0x00000001993086dc runApp(
:) + 152 (UIKitApp.swift:14)
67 SwiftUI 0x0000000198f7925c static App.main() + 128 (App.swift:114)
68 TikTok-Example 0x0000000104466c98 static ExampleApp.$main() + 24 (ExampleApp.swift:0)
69 TikTok-Example 0x0000000104466c98 main + 36
70 dyld 0x00000001b7232dcc start + 2240 (dyldMain.cpp:1269)

Thread 1 name:
Thread 1:
0 CoreFoundation 0x00000001944a5044 -[__NSDictionaryI objectForKey:] + 0 (NSDictionaryI.m:52)
1 MediaAccessibility 0x00000001c50abd18 MAPreferencesCopyProfileValue + 184 (MAPreferences.c:381)
2 MediaAccessibility 0x00000001c50abbc4 MAPreferencesCopyProfileValueWithExpectedType + 32 (MAPreferences.c:441)
3 MediaAccessibility 0x00000001c50abb1c MACaptionAppearancePrefCopyActiveProfileID + 232 (MACaptionAppearancePref.c:569)
4 MediaAccessibility 0x00000001c50ac99c _copyValue + 60 (MACaptionAppearance.c:266)
5 MediaAccessibility 0x00000001c50acf78 MACaptionAppearanceGetForegroundOpacity + 72 (MACaptionAppearance.c:400)
6 MediaToolbox 0x00000001a551d574 mediaAccessibilityDidChangeDoAsync + 168 (FigCaptionRendererMACache.c:233)
7 libdispatch.dylib 0x000000019c49e300 _dispatch_client_callout + 20 (object.m:561)
8 libdispatch.dylib 0x000000019c4a5894 _dispatch_lane_serial_drain + 748 (queue.c:3885)
9 libdispatch.dylib 0x000000019c4a63c4 _dispatch_lane_invoke + 380 (queue.c:3976)
10 libdispatch.dylib 0x000000019c4b1004 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:6913)
11 libdispatch.dylib 0x000000019c4b0878 _dispatch_workloop_worker_thread + 404 (queue.c:6507)
12 libsystem_pthread.dylib 0x00000001fe5cf964 _pthread_wqthread + 288 (pthread.c:2629)
13 libsystem_pthread.dylib 0x00000001fe5cfa04 start_wqthread + 8 (:-1)

Thread 2 name:
Thread 2:
0 libsystem_kernel.dylib 0x00000001dbc2ebc8 __open + 8 (:-1)
1 libsystem_kernel.dylib 0x00000001dbc2ebb4 open + 40 (open-base.c:101)
2 libFontParser.dylib 0x00000001c10fcb94 TFileDataReference::Map(char const*) + 72 (FileDataReference.cpp:662)
3 libFontParser.dylib 0x00000001c10fce08 TFileDataSurrogate::TFileDataSurrogate(char const*, timespec) + 328 (FileDataReference.cpp:681)
4 libFontParser.dylib 0x00000001c114da78 TFont::CreateFontEntitiesForFile(char const*, timespec, bool, short, char const*) + 496 (Font.cpp:819)
5 libFontParser.dylib 0x00000001c1154f6c FPFontCreateWithPathAndName + 380 (FontParser.cpp:2678)
6 CoreGraphics 0x0000000196086b84 create_private_data_with_path_and_name + 20 (xt-vtable.c:181)
7 CoreGraphics 0x0000000196086b48 CGFontCreateWithPathAndName + 64 (CGFontCreate.c:295)
8 CoreText 0x0000000195e7c064 CreateFontWithFontURL(__CFURL const*, __CFString const*, __CFString const*) + 76 (TCGUtilities.cpp:91)
9 CoreText 0x0000000195e7b508 TCGFontCache::CopyFont(__CFURL const*, __CFString const*, __CFString const*) + 144 (TCGFontCache.cpp:30)
10 CoreText 0x0000000195e7b23c TBaseFont::CopyNativeFont() const + 232 (TBaseFont.cpp:5595)
11 CoreText 0x0000000195e763b8 TDescriptorSource::CopyDescriptor(__CFURL const*, __CFString const*, __CFString const*) const + 200 (TDescriptorSource.cpp:697)
12 CoreText 0x0000000195ea3a7c TDescriptorSource::CopyFontDescriptorPerPostScriptName(__CFString const*, unsigned long, unsigned long, __CFString const*, __CFNumber const*, __CFNumber const*, CTFontLegibilityWeight, __CFBoolean ... + 1560 (TDescriptorSource.cpp:2882)
13 CoreText 0x0000000195e64804 TDescriptor::CreateMatchingDescriptorInternal(__CFSet const*, unsigned long) const + 1456 (TDescriptor.cpp:810)
14 CoreText 0x0000000195e67384 TDescriptor::CreateMatchingDescriptor(__CFSet const*, double, unsigned long) const + 248 (TDescriptor.cpp:908)
15 CoreText 0x0000000195eaaf98 CTFontDescriptorCreateMatchingFontDescriptor + 48 (CTFontDescriptor.cpp:124)
16 MediaAccessibility 0x00000001c50ac4c0 MAUtilitiesCreateCTFontDescriptorWithName + 228 (MAUtilities.c:411)
17 MediaAccessibility 0x00000001c50ac2f0 MAPreferencesCopyProfileFontDescriptor + 56 (MAPreferences.c:645)
18 MediaAccessibility 0x00000001c50abf3c MACaptionAppearanceCopyFontDescriptorWithStrokeForStyle + 184 (MACaptionAppearance.c:716)
19 MediaToolbox 0x00000001a551d5d4 mediaAccessibilityDidChangeDoAsync + 264 (FigCaptionRendererMACache.c:233)
20 libdispatch.dylib 0x000000019c49e300 _dispatch_client_callout + 20 (object.m:561)
21 libdispatch.dylib 0x000000019c4a5894 _dispatch_lane_serial_drain + 748 (queue.c:3885)
22 libdispatch.dylib 0x000000019c4a63c4 _dispatch_lane_invoke + 380 (queue.c:3976)
23 libdispatch.dylib 0x000000019c4b1004 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:6913)
24 libdispatch.dylib 0x000000019c4b0878 _dispatch_workloop_worker_thread + 404 (queue.c:6507)
25 libsystem_pthread.dylib 0x00000001fe5cf964 _pthread_wqthread + 288 (pthread.c:2629)
26 libsystem_pthread.dylib 0x00000001fe5cfa04 start_wqthread + 8 (:-1)

Thread 3 name:
Thread 3:
0 dyld 0x00000001b7230000 bool SwiftHashTable::equal<SwiftTypeProtocolConformanceLocationKey, SwiftTypeProtocolConformanceLocationKey>(SwiftTypeProtocolConformanceLocationKey const&, SwiftTypeProtocolConformanceLocationKey ... + 0 (OptimizerSwift.cpp:221)
1 dyld 0x00000001b722fd3c unsigned int SwiftHashTable::getIndex<SwiftTypeProtocolConformanceLocationKey, SwiftTypeProtocolConformanceLocationKey>(SwiftTypeProtocolConformanceLocationKey const&, unsigned char const*) const + 156 (OptimizerSwift.h:335)
2 dyld 0x00000001b722fc5c unsigned int SwiftHashTable::getPotentialTarget<SwiftTypeProtocolConformanceLocationKey, SwiftTypeProtocolConformanceLocationKey>(SwiftTypeProtocolConformanceLocationKey const&, unsigned char const... + 24 (OptimizerSwift.h:306)
3 dyld 0x00000001b722fad0 dyld4::APIs::_dyld_find_protocol_conformance(void const*, void const*, void const*) const + 172 (DyldAPIs.cpp:2626)
4 libswiftCore.dylib 0x000000018dc540ec swift_conformsToProtocolMaybeInstantiateSuperclasses(swift::TargetMetadataswift::InProcess const*, swift::TargetProtocolDescriptorswift::InProcess const*, bool) + 1828 (ProtocolConformance.cpp:1010)
5 libswiftCore.dylib 0x000000018dc5296c swift_conformsToProtocol + 156 (CompatibilityOverrideRuntime.def:169)
6 AttributeGraph 0x00000001bc6975e4 AG::LayoutDescriptor::make_layout(AG::swift::metadata const*, AGComparisonMode, AG::LayoutDescriptor::HeapMode) + 184 (ag-value.cc:1543)
7 AttributeGraph 0x00000001bc69ad68 AG::(anonymous namespace)::TypeDescriptorCache::drain_queue(void*) + 360 (ag-value.cc:1700)
8 libdispatch.dylib 0x000000019c49e300 _dispatch_client_callout + 20 (object.m:561)
9 libdispatch.dylib 0x000000019c4afdbc _dispatch_root_queue_drain + 864 (queue.c:7051)
10 libdispatch.dylib 0x000000019c4b03ec _dispatch_worker_thread2 + 156 (queue.c:7119)
11 libsystem_pthread.dylib 0x00000001fe5cf928 _pthread_wqthread + 228 (pthread.c:2642)
12 libsystem_pthread.dylib 0x00000001fe5cfa04 start_wqthread + 8 (:-1)

Thread 4 name:
Thread 4:
0 CoreFoundation 0x00000001944a4e08 _CFStringGetLength2 + 48 (CFString.c:2492)
1 CoreFoundation 0x00000001944a2650 comparisonUsingOrderingForStringKeys + 40 (NSConstantDictionary.m:53)
2 libsystem_c.dylib 0x000000019c4f69a8 bsearch + 68 (bsearch.c:66)
3 CoreFoundation 0x00000001944a25e4 -[NSConstantDictionary objectForKey:] + 384 (NSConstantDictionary.m:172)
4 CoreText 0x0000000195ea496c CopyNormalizedSystemFontPostScriptName(__CFString const*) + 76 (MetadataSupport.cpp:166)
5 CoreText 0x0000000195ea350c TDescriptorSource::CopyFontDescriptorPerPostScriptName(__CFString const*, unsigned long, unsigned long, __CFString const*, __CFNumber const*, __CFNumber const*, CTFontLegibilityWeight, __CFBoolean ... + 168 (TDescriptorSource.cpp:2875)
6 CoreText 0x0000000195e64804 TDescriptor::CreateMatchingDescriptorInternal(__CFSet const*, unsigned long) const + 1456 (TDescriptor.cpp:810)
7 CoreText 0x0000000195e67384 TDescriptor::CreateMatchingDescriptor(__CFSet const*, double, unsigned long) const + 248 (TDescriptor.cpp:908)
8 CoreText 0x0000000195eaaf98 CTFontDescriptorCreateMatchingFontDescriptor + 48 (CTFontDescriptor.cpp:124)
9 MediaAccessibility 0x00000001c50ac4c0 MAUtilitiesCreateCTFontDescriptorWithName + 228 (MAUtilities.c:411)
10 MediaAccessibility 0x00000001c50ac2f0 MAPreferencesCopyProfileFontDescriptor + 56 (MAPreferences.c:645)
11 MediaAccessibility 0x00000001c50abf3c MACaptionAppearanceCopyFontDescriptorWithStrokeForStyle + 184 (MACaptionAppearance.c:716)
12 MediaToolbox 0x00000001a551d5d4 mediaAccessibilityDidChangeDoAsync + 264 (FigCaptionRendererMACache.c:233)
13 libdispatch.dylib 0x000000019c49e300 _dispatch_client_callout + 20 (object.m:561)
14 libdispatch.dylib 0x000000019c4a5894 _dispatch_lane_serial_drain + 748 (queue.c:3885)
15 libdispatch.dylib 0x000000019c4a63c4 _dispatch_lane_invoke + 380 (queue.c:3976)
16 libdispatch.dylib 0x000000019c4b1004 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:6913)
17 libdispatch.dylib 0x000000019c4b0878 _dispatch_workloop_worker_thread + 404 (queue.c:6507)
18 libsystem_pthread.dylib 0x00000001fe5cf964 _pthread_wqthread + 288 (pthread.c:2629)
19 libsystem_pthread.dylib 0x00000001fe5cfa04 start_wqthread + 8 (:-1)

Thread 5 name:
Thread 5:
0 libicucore.A.dylib 0x000000019e0259a0 0x19dddd000 + 2394528
1 libsystem_c.dylib 0x000000019c4f69a8 bsearch + 68 (bsearch.c:66)
2 libicucore.A.dylib 0x000000019de34ff4 LocaleIDInfo::initBaseNames(char const*, LocIDCharStorage&, UErrorCode*) + 220 (ualoc.cpp:974)
3 libicucore.A.dylib 0x000000019de357e0 ualoc_localizationsToUse + 608 (ualoc.cpp:1144)
4 CoreFoundation 0x000000019450883c _CFBundleCreateMutableArrayOfFallbackLanguages + 340 (CFBundle_Locale.c:1090)
5 CoreFoundation 0x000000019450844c _CFBundleCopyPreferredLanguagesInList + 496 (CFBundle_Locale.c:1156)
6 CoreFoundation 0x00000001945081cc _CFBundleCopyLocalizationsForPreferences + 76 (CFBundle_Locale.c:1207)
7 CoreFoundation 0x0000000194508164 CFBundleCopyPreferredLocalizationsFromArray + 84 (CFBundle_Locale.c:1248)
8 MediaAccessibility 0x00000001c50abd9c MACaptionAppearancePrefCopySystemLanguage + 88 (MACaptionAppearancePref.c:451)
9 MediaAccessibility 0x00000001c50aba98 MACaptionAppearancePrefCopyActiveProfileID + 100 (MACaptionAppearancePref.c:563)
10 MediaAccessibility 0x00000001c50ab974 MACaptionAppearanceGetTextEdgeStyle + 48 (MACaptionAppearance.c:805)
11 MediaToolbox 0x00000001a551d5f8 mediaAccessibilityDidChangeDoAsync + 300 (FigCaptionRendererMACache.c:233)
12 libdispatch.dylib 0x000000019c49e300 _dispatch_client_callout + 20 (object.m:561)
13 libdispatch.dylib 0x000000019c4a5894 _dispatch_lane_serial_drain + 748 (queue.c:3885)
14 libdispatch.dylib 0x000000019c4a63c4 _dispatch_lane_invoke + 380 (queue.c:3976)
15 libdispatch.dylib 0x000000019c4b1004 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:6913)
16 libdispatch.dylib 0x000000019c4b0878 _dispatch_workloop_worker_thread + 404 (queue.c:6507)
17 libsystem_pthread.dylib 0x00000001fe5cf964 _pthread_wqthread + 288 (pthread.c:2629)
18 libsystem_pthread.dylib 0x00000001fe5cfa04 start_wqthread + 8 (:-1)

Thread 6 name:
Thread 6:
0 libsystem_kernel.dylib 0x00000001dbc2d178 mach_msg2_trap + 8 (:-1)
1 libsystem_kernel.dylib 0x00000001dbc2cf10 mach_msg2_internal + 80 (mach_msg.c:201)
2 libsystem_kernel.dylib 0x00000001dbc2ce28 mach_msg_overwrite + 436 (mach_msg.c:0)
3 libsystem_kernel.dylib 0x00000001dbc2cc68 mach_msg + 24 (mach_msg.c:323)
4 CoreFoundation 0x00000001944d3a9c __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2624)
5 CoreFoundation 0x00000001944d1994 __CFRunLoopRun + 1208 (CFRunLoop.c:3007)
6 CoreFoundation 0x00000001944d13f8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
7 Foundation 0x00000001934643ec -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 (NSRunLoop.m:373)
8 Foundation 0x00000001934916ac -[NSRunLoop(NSRunLoop) runUntilDate:] + 64 (NSRunLoop.m:420)
9 UIKitCore 0x0000000196859710 -[UIEventFetcher threadMain] + 420 (UIEventFetcher.m:1208)
10 Foundation 0x00000001934e7d40 NSThread__start + 732 (NSThread.m:991)
11 libsystem_pthread.dylib 0x00000001fe5d04d4 _pthread_start + 136 (pthread.c:904)
12 libsystem_pthread.dylib 0x00000001fe5cfa10 thread_start + 8 (:-1)

Thread 7 name:
Thread 7:
0 libsystem_c.dylib 0x000000019c4f6980 bsearch + 28 (bsearch.c:0)
1 CoreFoundation 0x00000001944e06cc CFLocaleCreateCanonicalLanguageIdentifierFromString + 340 (CFLocaleIdentifier.c:1777)
2 MediaAccessibility 0x00000001c50abdec MACaptionAppearancePrefCopySystemLanguage + 168 (MACaptionAppearancePref.c:459)
3 MediaAccessibility 0x00000001c50aba98 MACaptionAppearancePrefCopyActiveProfileID + 100 (MACaptionAppearancePref.c:563)
4 MediaAccessibility 0x00000001c50ac99c _copyValue + 60 (MACaptionAppearance.c:266)
5 MediaAccessibility 0x00000001c50acf78 MACaptionAppearanceGetForegroundOpacity + 72 (MACaptionAppearance.c:400)
6 MediaToolbox 0x00000001a551d574 mediaAccessibilityDidChangeDoAsync + 168 (FigCaptionRendererMACache.c:233)
7 libdispatch.dylib 0x000000019c49e300 _dispatch_client_callout + 20 (object.m:561)
8 libdispatch.dylib 0x000000019c4a5894 _dispatch_lane_serial_drain + 748 (queue.c:3885)
9 libdispatch.dylib 0x000000019c4a63c4 _dispatch_lane_invoke + 380 (queue.c:3976)
10 libdispatch.dylib 0x000000019c4b1004 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:6913)
11 libdispatch.dylib 0x000000019c4b0878 _dispatch_workloop_worker_thread + 404 (queue.c:6507)
12 libsystem_pthread.dylib 0x00000001fe5cf964 _pthread_wqthread + 288 (pthread.c:2629)
13 libsystem_pthread.dylib 0x00000001fe5cfa04 start_wqthread + 8 (:-1)

Thread 8 name:
Thread 8:
0 CoreFoundation 0x00000001944b0e90 CFArrayGetCount + 8 (CFArray.c:550)
1 CoreFoundation 0x00000001945081a8 _CFBundleCopyLocalizationsForPreferences + 40 (CFBundle_Locale.c:1206)
2 CoreFoundation 0x0000000194508164 CFBundleCopyPreferredLocalizationsFromArray + 84 (CFBundle_Locale.c:1248)
3 MediaAccessibility 0x00000001c50abd9c MACaptionAppearancePrefCopySystemLanguage + 88 (MACaptionAppearancePref.c:451)
4 MediaAccessibility 0x00000001c50aba98 MACaptionAppearancePrefCopyActiveProfileID + 100 (MACaptionAppearancePref.c:563)
5 MediaAccessibility 0x00000001c50ab974 MACaptionAppearanceGetTextEdgeStyle + 48 (MACaptionAppearance.c:805)
6 MediaAccessibility 0x00000001c50ac0b8 MACaptionAppearanceCopyFontDescriptorWithStrokeForStyle + 564 (MACaptionAppearance.c:716)
7 MediaToolbox 0x00000001a551d5d4 mediaAccessibilityDidChangeDoAsync + 264 (FigCaptionRendererMACache.c:233)
8 libdispatch.dylib 0x000000019c49e300 _dispatch_client_callout + 20 (object.m:561)
9 libdispatch.dylib 0x000000019c4a5894 _dispatch_lane_serial_drain + 748 (queue.c:3885)
10 libdispatch.dylib 0x000000019c4a63c4 _dispatch_lane_invoke + 380 (queue.c:3976)
11 libdispatch.dylib 0x000000019c4b1004 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:6913)
12 libdispatch.dylib 0x000000019c4b0878 _dispatch_workloop_worker_thread + 404 (queue.c:6507)
13 libsystem_pthread.dylib 0x00000001fe5cf964 _pthread_wqthread + 288 (pthread.c:2629)
14 libsystem_pthread.dylib 0x00000001fe5cfa04 start_wqthread + 8 (:-1)

Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x000000016b99cd98 x1: 0x000000016b99cd88 x2: 0x0000000104505b30 x3: 0x000000016b99cc80
x4: 0xfffffffffffffe20 x5: 0x0000000000000020 x6: 0x0000000107f5eb88 x7: 0x0000000107f5ec70
x8: 0x0000000000000000 x9: 0x0000000000000000 x10: 0x0000000000000003 x11: 0x0000000000000000
x12: 0x0000000000000001 x13: 0x0000000000000001 x14: 0x0000000107f5eb88 x15: 0x0000000107f5eb88
x16: 0x00000001fe523ea0 x17: 0x00000001e764cde0 x18: 0x0000000000000000 x19: 0x000000016b99ce18
x20: 0x0000000000000000 x21: 0x0000000000000007 x22: 0x000000016b99d1a0 x23: 0x00000002814de350
x24: 0x0000000107f53c40 x25: 0x000000016b99d3a0 x26: 0x0000000107f53c40 x27: 0x000000016b99d940
x28: 0x0000000107f53c40 fp: 0x000000016b99ce00 lr: 0x00000001044f80ac
sp: 0x000000016b99c7b0 pc: 0x0000000000000000 cpsr: 0x80001800
esr: 0x82000006 (Instruction Abort) Translation fault

Binary Images:
0x10445c000 - 0x10446ffff TikTok-Example arm64 <76a66448510d382da920da9fff472f0a> /private/var/containers/Bundle/Application/6163006F-5B66-4218-A786-B65841D1D00B/TikTok-Example.app/TikTok-Example
0x1044d4000 - 0x104503fff VideoPlayerContainer arm64 <2497c7465ef534a990f43c7f9410f75d> /private/var/containers/Bundle/Application/6163006F-5B66-4218-A786-B65841D1D00B/TikTok-Example.app/Frameworks/VideoPlayerContainer.framework/VideoPlayerContainer
0x1047cc000 - 0x1047d7fff libobjc-trampolines.dylib arm64e /private/preboot/Cryptexes/OS/usr/lib/libobjc-trampolines.dylib
0x18d862000 - 0x18ddb7fff libswiftCore.dylib arm64e <496d989cd1d93db8ba7c8f2d16215c1d> /usr/lib/swift/libswiftCore.dylib
0x193438000 - 0x193f97fff Foundation arm64e <5623831d571933a99691759f47d714d1> /System/Library/Frameworks/Foundation.framework/Foundation
0x19449e000 - 0x1949cafff CoreFoundation arm64e <5a6c1f41bf7032f6a1d65b894dd21362> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x195aaa000 - 0x195e4bfff QuartzCore arm64e <5c3ee3d91aaa3052a6c7b957b454ad71> /System/Library/Frameworks/QuartzCore.framework/QuartzCore
0x195e4c000 - 0x196022fff CoreText arm64e <825ebdce9f513e0fab56a785f622030d> /System/Library/Frameworks/CoreText.framework/CoreText
0x196023000 - 0x1966cafff CoreGraphics arm64e /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
0x1966cb000 - 0x1981a1fff UIKitCore arm64e <6398ddd4ea3631cdb8492f6217205bed> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
0x1981a2000 - 0x19a0d7fff SwiftUI arm64e <2607f99195473a50a7e3c0c3a09741e8> /System/Library/Frameworks/SwiftUI.framework/SwiftUI
0x19c49a000 - 0x19c4e0fff libdispatch.dylib arm64e /usr/lib/system/libdispatch.dylib
0x19c4e1000 - 0x19c55eff3 libsystem_c.dylib arm64e <6d03d4f6ec2f3c189013b4caf90539af> /usr/lib/system/libsystem_c.dylib
0x19dddd000 - 0x19e08fff7 libicucore.A.dylib arm64e <582613c7b0e83489bd5af41e571d5215> /usr/lib/libicucore.A.dylib
0x1a50b2000 - 0x1a5aa4fff MediaToolbox arm64e <3297b98725fc3084b5b1cc75e106406d> /System/Library/Frameworks/MediaToolbox.framework/MediaToolbox
0x1b722d000 - 0x1b72b569b dyld arm64e <28d6d2c146ce3d58b744b06a6c573888> /usr/lib/dyld
0x1bc693000 - 0x1bc6d6fff AttributeGraph arm64e /System/Library/PrivateFrameworks/AttributeGraph.framework/AttributeGraph
0x1c10d5000 - 0x1c122afff libFontParser.dylib arm64e /System/Library/PrivateFrameworks/FontServices.framework/libFontParser.dylib
0x1c50aa000 - 0x1c50bcfff MediaAccessibility arm64e <891ce99d6c6336acb5575c705c93260d> /System/Library/Frameworks/MediaAccessibility.framework/MediaAccessibility
0x1d7a7c000 - 0x1d7a84fff GraphicsServices arm64e /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x1dbc2c000 - 0x1dbc64fef libsystem_kernel.dylib arm64e <08f02c6b1443366598054a8bee87346e> /usr/lib/system/libsystem_kernel.dylib
0x1fe523000 - 0x1fe529fe7 libsystem_platform.dylib arm64e <6b90233485bd347eba40f535347a3417> /usr/lib/system/libsystem_platform.dylib
0x1fe5ce000 - 0x1fe5d9ff3 libsystem_pthread.dylib arm64e <8f9c865b29f5346badd5fde40e008c66> /usr/lib/system/libsystem_pthread.dylib
0x1feffc000 - 0x20016efcf libLAPACK.dylib arm64e <3efed75f54b0388b92a636030446fa4a> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libLAPACK.dylib

EOF
`

Context instance keep a strong reference

Context instance keep a strong reference inside the player widget

@main
struct ExampleApp: App {
var body: some Scene {
WindowGroup {
NavigationStack {
NavigationLink("Do some thing") {
ContentView()
}

        }
    }
}

}

when pop the content view the context, keep playing the video and do not dealocate

Mouse over the widgets keeps flashing on macOS when using hover gesture

[Original]
由于手势检测的视图层级位于 ZStack 的底部,鼠标进入其他控件元素也会被视为离开了手势检测的 Color.clear.contentShape(Rectangle())。

所以当鼠标浮动在控件上方时,会出现控件闪动问题。

可参考 Reliable mouseEnter/Exit for SwiftUI 解决

[Translation]
Since the gesture recognization work is placed at the far bottom layer. mouse moving to the other widgets is also taken as leaving the detection area which will trigger the onHover as well.

Therefore, when the mouse stays over other widgets, those widgets will keep flashing.

You can fix this problem with reference to Reliable mouseEnter/Exit for SwiftUI

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.