Dala.Photos (dala v0.0.2)

Copy Markdown View Source

Photo / video library picker.

On iOS 14+ no permission is required (the picker itself is sandboxed). On Android, READ_MEDIA_IMAGES / READ_MEDIA_VIDEO may be needed.

Results arrive as:

handle_info({:photos, :picked,    items},   socket)
handle_info({:photos, :cancelled},           socket)

Each item in items is:

%{path: "/tmp/dala_pick_xxx.jpg", type: :image | :video,
  width: 1920, height: 1080}

iOS: PHPickerViewController. Android: PickMultipleVisualMedia.

Summary

Functions

pick(socket, opts \\ [])

@spec pick(
  Dala.Socket.t(),
  keyword()
) :: Dala.Socket.t()