Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
d6a65f10
Commit
d6a65f10
authored
Mar 11, 2018
by
Felix Paul Kühne
Committed by
Carola
Mar 22, 2018
Browse files
playback controller: use the modern openURL API if available
parent
3f6f290c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Sources/VLCPlaybackController.m
View file @
d6a65f10
...
...
@@ -294,14 +294,21 @@ typedef NS_ENUM(NSUInteger, VLCAspectRatio) {
_playerIsSetup
=
NO
;
[
_shuffleStack
removeAllObjects
];
if
(
@available
(
iOS
10
,
*
))
{
if
(
_errorCallback
&&
_mediaPlayer
.
state
==
VLCMediaPlayerStateError
&&
!
_sessionWillRestart
)
[[
UIApplication
sharedApplication
]
openURL
:
_errorCallback
options
:@{}
completionHandler
:
nil
];
else
if
(
_successCallback
&&
!
_sessionWillRestart
)
[[
UIApplication
sharedApplication
]
openURL
:
_successCallback
options
:@{}
completionHandler
:
nil
];
}
else
{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
/* UIApplication's replacement calls require iOS 10 or later, which we can't enforce as of yet */
if
(
_errorCallback
&&
_mediaPlayer
.
state
==
VLCMediaPlayerStateError
&&
!
_sessionWillRestart
)
[[
UIApplication
sharedApplication
]
openURL
:
_errorCallback
];
else
if
(
_successCallback
&&
!
_sessionWillRestart
)
[[
UIApplication
sharedApplication
]
openURL
:
_successCallback
];
/* UIApplication's replacement calls require iOS 10 or later, which we can't enforce as of yet */
if
(
_errorCallback
&&
_mediaPlayer
.
state
==
VLCMediaPlayerStateError
&&
!
_sessionWillRestart
)
[[
UIApplication
sharedApplication
]
openURL
:
_errorCallback
];
else
if
(
_successCallback
&&
!
_sessionWillRestart
)
[[
UIApplication
sharedApplication
]
openURL
:
_successCallback
];
#pragma clang diagnostic pop
}
[[
self
remoteControlService
]
unsubscribeFromRemoteCommands
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment