Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
531
Issue boards
Milestones
Wiki
Code
Merge requests
13
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
0b227fbc
Commit
0b227fbc
authored
7 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Popup: init video surface once it's ready
parent
ac8b2513
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
+22
-13
22 additions, 13 deletions
vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
with
22 additions
and
13 deletions
vlc-android/src/org/videolan/vlc/gui/video/PopupManager.java
+
22
−
13
View file @
0b227fbc
...
...
@@ -55,7 +55,7 @@ import org.videolan.vlc.gui.preferences.PreferencesActivity;
import
org.videolan.vlc.gui.view.PopupLayout
;
public
class
PopupManager
implements
PlaybackService
.
Callback
,
GestureDetector
.
OnDoubleTapListener
,
View
.
OnClickListener
,
GestureDetector
.
OnGestureListener
,
IVLCVout
.
OnNewVideoLayoutListener
{
View
.
OnClickListener
,
GestureDetector
.
OnGestureListener
,
IVLCVout
.
OnNewVideoLayoutListener
,
IVLCVout
.
Callback
{
private
static
final
String
TAG
=
"VLC/PopupManager"
;
...
...
@@ -96,9 +96,9 @@ public class PopupManager implements PlaybackService.Callback, GestureDetector.O
mRootView
=
(
PopupLayout
)
li
.
inflate
(
R
.
layout
.
video_popup
,
null
);
if
(
mAlwaysOn
)
mRootView
.
setKeepScreenOn
(
true
);
mPlayPauseButton
=
(
ImageView
)
mRootView
.
findViewById
(
R
.
id
.
video_play_pause
);
mCloseButton
=
(
ImageView
)
mRootView
.
findViewById
(
R
.
id
.
popup_close
);
mExpandButton
=
(
ImageView
)
mRootView
.
findViewById
(
R
.
id
.
popup_expand
);
mPlayPauseButton
=
mRootView
.
findViewById
(
R
.
id
.
video_play_pause
);
mCloseButton
=
mRootView
.
findViewById
(
R
.
id
.
popup_close
);
mExpandButton
=
mRootView
.
findViewById
(
R
.
id
.
popup_expand
);
mPlayPauseButton
.
setOnClickListener
(
this
);
mCloseButton
.
setOnClickListener
(
this
);
mExpandButton
.
setOnClickListener
(
this
);
...
...
@@ -109,17 +109,9 @@ public class PopupManager implements PlaybackService.Callback, GestureDetector.O
final
IVLCVout
vlcVout
=
mService
.
getVLCVout
();
vlcVout
.
setVideoView
((
SurfaceView
)
mRootView
.
findViewById
(
R
.
id
.
player_surface
));
vlcVout
.
addCallback
(
this
);
vlcVout
.
attachViews
(
this
);
mRootView
.
setVLCVOut
(
vlcVout
);
mService
.
setVideoAspectRatio
(
null
);
mService
.
setVideoScale
(
0
);
mService
.
setVideoTrackEnabled
(
true
);
if
(!
mService
.
isPlaying
())
mService
.
playIndex
(
mService
.
getCurrentMediaPosition
());
else
mService
.
flush
();
mService
.
startService
(
new
Intent
(
mService
,
PlaybackService
.
class
));
showNotification
();
}
@Override
...
...
@@ -333,4 +325,21 @@ public class PopupManager implements PlaybackService.Callback, GestureDetector.O
private
void
hideNotification
()
{
NotificationManagerCompat
.
from
(
mService
).
cancel
(
42
);
}
@Override
public
void
onSurfacesCreated
(
IVLCVout
vlcVout
)
{
mService
.
setVideoAspectRatio
(
null
);
mService
.
setVideoScale
(
0
);
mService
.
setVideoTrackEnabled
(
true
);
if
(!
mService
.
isPlaying
())
mService
.
playIndex
(
mService
.
getCurrentMediaPosition
());
else
mService
.
flush
();
showNotification
();
}
@Override
public
void
onSurfacesDestroyed
(
IVLCVout
vlcVout
)
{
vlcVout
.
removeCallback
(
this
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment