mediaGalleries: "contents_changed" event doesn't work on devices connected via ptp/mtp
Reported by
anyw...@gmail.com,
Jan 18 2018
|
||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; CrOS x86_64 10032.86.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.140 Safari/537.36 Platform: 10032.86.0 (Official Build) stable-channel link Steps to reproduce the problem: 1. Connect a phone or a dslr camera to your chromebook 2. Make sure device is connected via ptp or mtp 3. getMediaFileSystems and chrome.mediaGalleries.addGalleryWatch 4. Take a photo or remove a photo from your phone What is the expected behavior? chrome.mediaGalleries.onGalleryChanged.addListener callback with event "contents_changed" is fired What went wrong? Callback not fired Did this work before? N/A Does this work in other browsers? Yes Chrome version: 63.0.3239.140 Channel: stable OS Version: 10032.86.0 Flash Version: Callback fires on sdcard from a camera that is directly attached to a chromebook. Interestingly, getMediaFileSystemMetadata on sdcard says that isMediaDevice is true. Is this a bug too?
,
Jan 19 2018
,
Feb 19 2018
<files-triage>
,
Feb 28 2018
,
Mar 23 2018
Assigning to tommycli@ for triage.
,
Mar 23 2018
I believe we use file system monitors for addGalleryWatch. I would not be surprised if they do not work for PTP/MTP devices. I also doubt we will add support for watching PTP/MTP galleries. I'll bounce this to thestig@ who is is the MTPd author if he has any further comment.
,
Mar 23 2018
I don't have to work on this, but happy to help review code if someone else wants to take this bug. Donna, would you be intersted in taking a look after finishing the servification work with the MTP code? What needs to happen is: a) mtpd has to listen for LIBMTP_EVENT_OBJECT_ADDED / LIBMTP_EVENT_OBJECT_REMOVED events from the device. It already listens for LIBMTP_EVENT_STORE_ADDED / LIBMTP_EVENT_STORE_REMOVED. b) Add new DBus signals and fire them. See MtpdServer::StorageAttached() and dbus_bindings/org.chromium.Mtpd.xml. c) On the Chromium side, the browser has to listen for the new signals and plumb them up to the extensions code. (This one is the most hand-wavy) Even with all the code written, we still need to see what PTP/MTP devices actually send object added / removed events. If a particular phone or camera doesn't send the first place, all the work here won't help.
,
Mar 25 2018
Hi Lei, I'd like to take this issue after MTP servicification and these hints are good points to follow. The only concern is that, I don't have a ChromeBook on hand, it may take some time to find a device for verification. Or, is ChromeBook a hard need to verify the issue?
,
Mar 28 2018
I found a pixelbook, so take this bug.
,
Apr 19 2018
,
Sep 20
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by anyw...@gmail.com
, Jan 19 2018