Esri / crowdsource-manager

An ArcGIS Online group application template authored by organization and made available to operations staff to review incoming problems or observations; and assign problems or observations to appropriate staff.
Apache License 2.0
13 stars 21 forks source link

Show hyperlinked images and videos in the media panel #152

Closed MikeMillerGIS closed 8 years ago

MikeMillerGIS commented 8 years ago

If a field is a hyperlinked image, show in the media panel

MikeMillerGIS commented 8 years ago

currently, the popup detects this and shows more info.

CTLocalGovTeam commented 8 years ago

@allisonmuise , @MikeMillerGIS

We are working on this enhancement and will keep you updated.

--Pratik Gohil

CTLocalGovTeam commented 8 years ago

@allisonmuise , @MikeMillerGIS

We will be following below approaches to show images and videos in the media panel,

For displaying images,

Hyperlinks may or may not contain its image type format(extension like .jpg or .png), for instance, Image URL http://goo.gl/GWtGo does not contain an extension, so for this we need to check the URL by loading images, and incase if it’s an image then it will be shown in the carousel.

But, this approch will affect the performance of the app as onload method of an image is an AJAX request which consumes some time, and multiple URLs will consume more time depending on the size of the image..

Performance issue can be avoided by searching for the image’s extension in the URL(like .jpg or .png), but in this case encrypted URL like bitly won’t work.

For displaying videos,

Unlike images, videos must have a format type as an extension in the URL. This is to identify that it is a video URL. For e.g. http://172.28.28.113:8088/EsriDevSummit2016/movies/2016-esri-dev-1414.mp4, with .mp4 as its extension.

The following are the limitations for the videos because we are using html5 video component,

  1. Videos with extension like .mp4, .ogg or .webm will only be supported.
  2. Chrome and Mozilla supports .mp4, .webm, and .ogg video type formats, whereas other browsers like IE 9, 10, 11, and Safari only supports .mp4 video format.

Please let us know your thoughts on this.

--Pratik Gohil

MikeMillerGIS commented 8 years ago

For this release, I would say we only support URLs with the extension in it. If we do support inspecting the URL then I would make it optional in the config. All other comments I agree with. Thank you.

allisonmuise commented 8 years ago

I agree with the above as well. @MikeMillerGIS : Are you familiar with .webm and .ogg formats? Are they worth supporting as well, or should we stay consistent with just mp4?

MikeMillerGIS commented 8 years ago

Heard of them, but mp4 is prob fine for a v1.

allisonmuise commented 8 years ago

@CTLocalGovTeam : Let's do just mp4 and wait for users to present use cases for needing the others.

CTLocalGovTeam commented 8 years ago

@allisonmuise , @MikeMillerGIS ,

We are planning to support below standard image extensions

  1. JPG/JPEG
  2. PNG
  3. GIF
  4. BMP
  5. ICO

Please let us know if we need to support any other image extensions.

--Pratik Gohil

MikeMillerGIS commented 8 years ago

That looks good.

allisonmuise commented 8 years ago

@CTLocalGovTeam ICO files are not listed as a supported attachment type, so I don't think we need to include those. TIF/TIFF files are supported, though so I'd like to add them to the list.

CTLocalGovTeam commented 8 years ago

@allisonmuise , @MikeMillerGIS

We have few observations on TIFF images & how it will work after adding it to media panel.

TIFF image will always get rendered by some default image & user must download it to view it. This behaviour is similar in AGOL also as shown below

Viewing TIFF image in AGOL which is added in popup media tiff image download in agol

Viewing TIFF image in media panel which is added as attachment tiff image download in media panel

--Pratik Gohil

MikeMillerGIS commented 8 years ago

Looks like a limitation of browsers. We can mark as known issue

https://urldefense.proofpoint.com/v2/url?u=http-3A__www.alternatiff.com_howtoembed.html&d=CwIGaQ&c=n6-cguzQvX_tUIrZOS_4Og&r=MeZdcsvkb-zI_AmyTRCvox6_oa6YAZbr37pFzHq_ByDEHrd2lhm-fomMSR4bB_d41s2kSAmyzG8nkzYC7sP9ZtswsK3ps4u9Ie58IOWaF8ZiT157V0vrk3bcpsWj2t6wAYxk2TfJ41Cw_3uqdFwOTw&m=SW1QqLrpw8jrFBZZU4VPeeWZEs7rgh2NkU9bWXu04KM&s=I7WHXPhU1PL6pIIG54qmAoMxz11Lv4ydCOYUPNmZ3v8&e=

allisonmuise commented 8 years ago

@CTLocalGovTeam : Ok, please handle TIFF as you would non-images

allisonmuise commented 8 years ago

@MikeMillerGIS This is on devext if you'd like to take a look

MikeMillerGIS commented 8 years ago

Nice, works great!