Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLC-iOS
Commits
5fa6b857
Commit
5fa6b857
authored
Mar 26, 2014
by
Carola Nitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playback: pause playback when headphones get unplugged
parent
2185a37f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
Sources/VLCMovieViewController.m
Sources/VLCMovieViewController.m
+11
-0
No files found.
Sources/VLCMovieViewController.m
View file @
5fa6b857
...
...
@@ -218,6 +218,8 @@
name:
UIApplicationDidBecomeActiveNotification
object
:
nil
];
[
center
addObserver
:
self
selector
:
@selector
(
applicationDidEnterBackground
:
)
name:
UIApplicationDidEnterBackgroundNotification
object
:
nil
];
[
center
addObserver
:
self
selector
:
@selector
(
audioSessionRouteChange
:
)
name:
AVAudioSessionRouteChangeNotification
object
:
nil
];
_playingExternallyTitle
.
text
=
NSLocalizedString
(
@"PLAYING_EXTERNALLY_TITLE"
,
@""
);
_playingExternallyDescription
.
text
=
NSLocalizedString
(
@"PLAYING_EXTERNALLY_DESC"
,
@""
);
...
...
@@ -1377,6 +1379,15 @@
}
}
-
(
void
)
audioSessionRouteChange
:(
NSNotification
*
)
notification
{
NSArray
*
outputs
=
[[
AVAudioSession
sharedInstance
]
currentRoute
].
outputs
;
NSString
*
portName
=
[[
outputs
objectAtIndex
:
0
]
portName
];
if
(
!
[
portName
isEqualToString
:
@"Headphones"
])
[
_listPlayer
pause
];
}
-
(
void
)
mediaDidFinishParsing
:(
VLCMedia
*
)
aMedia
{
[
self
_updateDisplayedMetadata
];
...
...
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