Page 1 of 1

Sending position with Intent

Posted: 27 Jun 2016 10:35
by obia
Hi!
I'm using the following code to start VLC with an Intent:

Code: Select all

Intent i = new Intent(Intent.ACTION_VIEW); i.setComponent(new ComponentName("org.videolan.vlc", "org.videolan.vlc.gui.video.VideoPlayerActivity")); i.setData(Uri.parse("http://mynetwork/share/movie.mp4")); i.putExtra("from_start", false); i.putExtra("title", "Test title"); i.putExtra("position", (long)60000); startActivityForResult(i,0);
The movie is starting fine and also showing the correct title as passed in. BUT I cannot get the position parameter to work, meaning I can not start the movie at a certain time.
I'm successfully retrieving the "extra_position" value as a return result when quiting the player but I'm not able to send it back in to resume.

I've tested with a lot of different movie types/formats to no success. What is the correct way to send in the position parameter when calling the intent? I found the position parameter in an example on this forum but not on the official Wiki page. Hidden feature?

It works fine for all movie types if I use the MX Player intent but not with VLC..

Re: Sending position with Intent

Posted: 29 Jun 2016 11:39
by Dekans
It was missing.
I just added it back, I backport it for VLC 2.0.2

Re: Sending position with Intent

Posted: 29 Jun 2016 14:19
by obia
That's awesome, thanks! Looking forward to the update.
Now if I only could ignore SSL errors when connecting to webdav shares that has self-signed/user certificates... well, you can't have it all :)

Re: Sending position with Intent

Posted: 29 Jun 2016 18:51
by Jean-Baptiste Kempf
It should tell you about this SSL error, no? And then never again.

Re: Sending position with Intent

Posted: 30 Jun 2016 14:39
by obia
Thanks for answering guys!

@Dekans: Got the 2.0.2 Beta update and now the position parameter is working, super!

@Jean-Baptiste Kempf: Unfortunately no. I first get a popup that warns me about "Insecure site". I click "View certificate" and then "Accept permanently". After that I come back to the "Insecure site" popup and I can click between these popups a number of times. They will never go away but after a 3-4 of times I can see that the movie starts streaming in the background. At this point if I click outside the popup for a number of times the popups finally go away and I can watch the movie. If I stop the movie I need to redo the whole procedure.
I'm streaming from a WebDav share on a Sinology NAS using the following type of url: https://user:pass@mynas.synology.me:500 ... ymovie.avi

Here comes the log for your convenience

Code: Select all

06-30 14:09:21.733 V/VLC/PlaybackService(14815): Creating on-the-fly Media object for https://user:pass@mynas.synology.me:5006/Movie/Movie.avi 06-30 14:09:21.734 V/VLC/PlaybackService(14815): Loading position 0 in [org.videolan.vlc.media.MediaWrapper@88bf9de] 06-30 14:09:21.784 E/BitmapFactory(14815): Unable to decode stream: java.lang.NullPointerException 06-30 14:09:21.788 E/BitmapFactory(14815): Unable to decode stream: java.lang.NullPointerException 06-30 14:09:21.955 E/SpannableStringBuilder(14815): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length 06-30 14:09:21.955 E/SpannableStringBuilder(14815): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length 06-30 14:09:21.972 D/VLC/VideoPlayerActivity(14815): MediaRouter information : android.media.MediaRouter@b857ed7 06-30 14:09:21.975 I/VLC/VideoPlayerActivity(14815): No secondary display detected 06-30 14:09:22.087 E/BitmapFactory(14815): Unable to decode stream: java.lang.NullPointerException 06-30 14:09:22.142 W/MediaRouter(14815): removeCallback(org.videolan.vlc.gui.video.VideoPlayerActivity$1@9818661): callback not registered 06-30 14:09:22.142 E/VLC/VideoPlayerActivity(14815): Invalid surface size 06-30 14:09:22.146 D/VLC/VideoPlayerActivity(14815): Continuing playback from PlaybackService at index 0 06-30 14:09:22.164 D/VLC (14815): [00000074f185a508/39df] core input: Creating an input for 'Movie.avi' 06-30 14:09:22.172 D/VLC (14815): [00000074f185a508/418a] core input: using timeshift granularity of 50 MiB 06-30 14:09:22.172 D/VLC (14815): [00000074f185a508/418a] core input: using default timeshift path 06-30 14:09:22.175 D/VLC (14815): [00000074f185a508/418a] core input: `https://user:pass@mynas.synology.me:5006/Movie/Movie.avi' gives access `https' demux `' path `user:pass@mynas.synology.me:5006/Movie/Movie.avi' 06-30 14:09:22.175 D/VLC (14815): [000000750c47b888/418a] core input source: specified demux: any 06-30 14:09:22.175 D/VLC (14815): [000000750c47b888/418a] core input source: creating demux: access='https' demux='any' location='user:pass@mynas.synology.me:5006/Movie/Movie.avi' file='(null)' 06-30 14:09:22.175 D/VLC (14815): [000000750c46d808/418a] core demux: looking for access_demux module matching "https": 6 candidates 06-30 14:09:22.175 D/VLC (14815): [000000750c46d808/418a] core demux: no access_demux modules matched 06-30 14:09:22.175 D/VLC (14815): [000000750c46d948/418a] core access: creating access: https://user:pass@mynas.synology.me:5006/Movie/Movie.avi 06-30 14:09:22.176 D/VLC (14815): [000000750c46d948/418a] core access: looking for access module matching "https": 24 candidates 06-30 14:09:22.178 D/VLC (14815): [000000750c442328/418a] core tls client: looking for tls client module matching "any": 1 candidates 06-30 14:09:22.184 D/VLC (14815): [000000750c442328/418a] gnutls tls client: using GnuTLS version 3.3.22 06-30 14:09:22.236 I/VLC/PlaybackService(14815): Media.Event.MetaChanged: 12 06-30 14:09:22.237 I/VLC/PlaybackService(14815): Media.Event.MetaChanged: 12 06-30 14:09:22.264 W/IInputConnectionWrapper(14815): finishComposingText on inactive InputConnection 06-30 14:09:22.450 D/VLC (14815): [000000750c442328/418a] gnutls tls client: loaded 148 trusted CAs 06-30 14:09:22.450 D/VLC (14815): [000000750c442328/418a] core tls client: using tls client module "gnutls" 06-30 14:09:22.451 D/VLC (14815): [000000750c46d948/418d] transport access: resolving mynas.synology.me ... 06-30 14:09:23.242 D/VLC (14815): [000000750c46d948/418d] transport access: connecting to mynas.synology.me port 5006 ... 06-30 14:09:23.311 D/VLC (14815): [000000750c442328/418d] gnutls tls client: TLS handshake: Resource temporarily unavailable, try again. 06-30 14:09:23.409 D/VLC (14815): [000000750c442328/418d] gnutls tls client: TLS handshake: A TLS warning alert has been received. 06-30 14:09:23.411 D/VLC (14815): [000000750c442328/418d] gnutls tls client: TLS handshake: Resource temporarily unavailable, try again. 06-30 14:09:23.459 D/VLC (14815): [000000750c442328/418d] gnutls tls client: TLS handshake: Resource temporarily unavailable, try again. 06-30 14:09:23.526 D/VLC (14815): [000000750c442328/418d] gnutls tls client: TLS handshake: Success. 06-30 14:09:23.531 E/VLC (14815): [000000750c442328/418d] gnutls tls client: Certificate verification failure: The certificate is NOT trusted. The certificate issuer is unknown. 06-30 14:09:23.531 D/VLC (14815): [000000750c442328/418d] gnutls tls client: 2 certificate(s) in the list 06-30 14:09:23.534 D/VLC (14815): [000000750c442328/418d] gnutls tls client: no known certificates for mynas.synology.me 06-30 14:09:23.645 I/AppCompatDelegate(14815): The Activity's LayoutInflater already has a Factory installed so we can not install AppCompat's 06-30 14:09:24.027 W/VLC/VLCApplication(14815): onTrimMemory, level: 10 06-30 14:09:24.804 D/AudioManager(14815): AudioManager dispatching onAudioFocusChange(-3) for android.media.AudioManager@348e47org.videolan.vlc.PlaybackService$1@ba46674 06-30 14:09:24.806 I/VLC/PlaybackService(14815): AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK 06-30 14:09:26.241 D/AudioManager(14815): AudioManager dispatching onAudioFocusChange(1) for android.media.AudioManager@348e47org.videolan.vlc.PlaybackService$1@ba46674 06-30 14:09:26.241 I/VLC/PlaybackService(14815): AUDIOFOCUS_GAIN: -1, false 06-30 14:09:42.619 I/AppCompatDelegate(14815): The Activity's LayoutInflater already has a Factory installed so we can not install AppCompat's 06-30 14:09:42.935 W/VLC/VLCApplication(14815): onTrimMemory, level: 10 06-30 14:09:44.485 D/VLC (14815): [000000750c46d948/418a] h1conn access: outgoing request: 06-30 14:09:44.485 D/VLC (14815): GET /Movie/Movie.avi HTTP/1.1 06-30 14:09:44.485 D/VLC (14815): Host: mynas.synology.me:5006 06-30 14:09:44.485 D/VLC (14815): Accept: */* 06-30 14:09:44.485 D/VLC (14815): Accept-Language: en_US 06-30 14:09:44.485 D/VLC (14815): User-Agent: VLC/3.0.0-git LibVLC/3.0.0-git 06-30 14:09:44.485 D/VLC (14815): Range: bytes=0- 06-30 14:09:44.485 D/VLC (14815): 06-30 14:09:44.489 D/VLC (14815): [000000750c46d948/418a] h1conn access: connection failed 06-30 14:09:44.491 E/VLC (14815): [000000750c46d948/418a] access access: HTTP connection failure 06-30 14:09:44.519 D/VLC (14815): [000000750c442328/418a] core tls client: looking for tls client module matching "any": 1 candidates 06-30 14:09:44.519 D/VLC (14815): [000000750c442328/418a] gnutls tls client: using GnuTLS version 3.3.22 06-30 14:09:44.878 D/VLC (14815): [000000750c442328/418a] gnutls tls client: loaded 148 trusted CAs 06-30 14:09:44.879 D/VLC (14815): [000000750c442328/418a] core tls client: using tls client module "gnutls" 06-30 14:09:44.879 D/VLC (14815): [000000750c46d948/418a] http access: querying proxy for https://user:pass@mynas.synology.me:5006/Movie/Movie.avi 06-30 14:09:44.879 D/VLC (14815): [000000750c46d948/418a] http access: no proxy 06-30 14:09:44.879 D/VLC (14815): [000000750c46d948/418a] http access: http: server='mynas.synology.me' port=5006 file='/Movie/Movie.avi' 06-30 14:09:44.879 D/VLC (14815): [000000750c46d948/418a] http access: user='user' 06-30 14:09:44.879 W/VLC (14815): [000000750c46d948/418a] core access: Password in a URI is DEPRECATED 06-30 14:09:44.879 D/VLC (14815): [000000750c46d948/418a] core access: net: connecting to mynas.synology.me port 5006 06-30 14:09:45.308 D/VLC (14815): [000000750c46d948/418a] core access: connection succeeded (socket = 84) 06-30 14:09:45.310 D/VLC (14815): [000000750c442328/418a] gnutls tls client: TLS handshake: Resource temporarily unavailable, try again. 06-30 14:09:45.379 D/VLC (14815): [000000750c442328/418a] gnutls tls client: TLS handshake: A TLS warning alert has been received. 06-30 14:09:45.394 D/VLC (14815): [000000750c442328/418a] gnutls tls client: TLS handshake: Resource temporarily unavailable, try again. 06-30 14:09:45.451 D/VLC (14815): [000000750c442328/418a] gnutls tls client: TLS handshake: Success. 06-30 14:09:45.453 E/VLC (14815): [000000750c442328/418a] gnutls tls client: Certificate verification failure: The certificate is NOT trusted. The certificate issuer is unknown. 06-30 14:09:45.453 D/VLC (14815): [000000750c442328/418a] gnutls tls client: 2 certificate(s) in the list 06-30 14:09:45.455 D/VLC (14815): [000000750c442328/418a] gnutls tls client: no known certificates for mynas.synology.me 06-30 14:09:45.547 I/AppCompatDelegate(14815): The Activity's LayoutInflater already has a Factory installed so we can not install AppCompat's 06-30 14:09:45.855 W/VLC/VLCApplication(14815): onTrimMemory, level: 15 06-30 14:10:13.316 W/InputEventReceiver(14815): Attempted to finish an input event but the input event receiver has already been disposed. --------- beginning of system 06-30 14:10:13.317 W/ViewRootImpl[Insecure site](14815): Dropping event due to root view being removed: MotionEvent { action=ACTION_MOVE, actionButton=0, id[0]=0, x[0]=834.0, y[0]=1317.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=1, eventTime=473333087, downTime=473333071, deviceId=7, source=0x1002 } 06-30 14:10:13.317 W/InputEventReceiver(14815): Attempted to finish an input event but the input event receiver has already been disposed. 06-30 14:10:13.335 E/VLC (14815): [000000750c442328/418a] core tls client: TLS session handshake error 06-30 14:10:13.335 E/VLC (14815): [000000750c46d948/418a] http access: cannot establish HTTP/TLS session 06-30 14:10:13.355 D/VLC (14815): [000000750c46d948/418a] core access: no access modules matched 06-30 14:10:13.355 E/VLC (14815): [000000750c47b888/418a] core input source: cannot access https://user:pass@mynas.synology.me:5006/Movie/Movie.avi 06-30 14:10:13.398 W/VLC/VLCApplication(14815): ErrorMessage VLC is unable to open the MRL 'https://user:pass@mynas.synology.me:5006/Movie/Movie.avi'. Check the log for details.
I know that the movie link is working since I've tested in the MX Player app on the phone and mapping the share on the Mac.

Re: Sending position with Intent

Posted: 03 Jul 2016 12:07
by Jean-Baptiste Kempf
Then, there is an issue in the HTTPS stack.

Re: Sending position with Intent

Posted: 03 Jul 2016 20:35
by obia
Ok, so can I post a bug somewhere or what happens now? Really would like to have this fix since this issue has been there for at least one and a half year now.

Re: Sending position with Intent

Posted: 03 Jul 2016 23:04
by Jean-Baptiste Kempf
Our bugtracker.