Current section

40 Versions

Jump to

Compare versions

4 files changed
+6 additions
-9 deletions
  @@ -1,6 +1,6 @@
1 1 {<<"links">>,[{<<"GitHub">>,<<"https://github.com/kim-company/kim_hls">>}]}.
2 2 {<<"name">>,<<"kim_hls">>}.
3 - {<<"version">>,<<"1.0.4">>}.
3 + {<<"version">>,<<"1.0.5">>}.
4 4 {<<"description">>,
5 5 <<"HTTP Live Streaming (HLS) library. Modules, variables and functionality is bound to RFC 8216.">>}.
6 6 {<<"elixir">>,<<"~> 1.14">>}.
  @@ -483,11 +483,7 @@ defmodule HLS.Packager do
483 483 {:reply, {:error, :master_playlist_written}, state}
484 484
485 485 true ->
486 - stream =
487 - Map.update!(opts[:stream], :uri, fn
488 - nil -> build_track_variant_uri(state, track_id)
489 - uri -> uri
490 - end)
486 + stream = Map.replace!(opts[:stream], :uri, build_track_variant_uri(state, track_id))
491 487
492 488 media_playlist = %HLS.Playlist.Media{
493 489 uri: stream.uri,
  @@ -2,7 +2,7 @@ defmodule HLS.VariantStream do
2 2 alias HLS.Playlist.Tag
3 3
4 4 @type t :: %__MODULE__{
5 - uri: URI.t(),
5 + uri: nil | URI.t(),
6 6 bandwidth: pos_integer(),
7 7 average_bandwidth: pos_integer(),
8 8 codecs: [String.t()],
  @@ -15,9 +15,10 @@ defmodule HLS.VariantStream do
15 15 closed_captions: Tag.group_id_t()
16 16 }
17 17
18 - @mandatory_keys [:uri, :bandwidth, :codecs]
18 + @mandatory_keys [:bandwidth, :codecs]
19 19 @enforce_keys @mandatory_keys
20 20 @optional_keys [
21 + :uri,
21 22 :average_bandwidth,
22 23 :resolution,
23 24 :frame_rate,
  @@ -6,7 +6,7 @@ defmodule HLS.MixProject do
6 6 def project do
7 7 [
8 8 app: :kim_hls,
9 - version: "1.0.4",
9 + version: "1.0.5",
10 10 elixir: "~> 1.14",
11 11 start_permanent: Mix.env() == :prod,
12 12 elixirc_paths: elixirc_paths(Mix.env()),