Skip to content

Commit

Permalink
(iOS) swiftUI: learnings
Browse files Browse the repository at this point in the history
  • Loading branch information
SensehacK committed Mar 1, 2024
1 parent c473a10 commit e4f38c2
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 11 deletions.
10 changes: 10 additions & 0 deletions ios/config/over_the_air.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@

# Over the air


## Server Driven UI

Server driven UI ? -> to quickly show different views for different types of users.


## Reference

[lokalise | OTA - sdk recommended practices](https://lokalise.com/blog/over-the-air-mobile-sdks-recommended-practices/)
25 changes: 15 additions & 10 deletions ios/library/HLS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Every HLS file has these properties
## [HLS Playlist Types](HLS_types.md)

## De-Muxed | Muxing

## Test Streams

[developer.apple.com/streaming/examples/](https://developer.apple.com/streaming/examples/)
Expand All @@ -34,13 +35,9 @@ HLS stream having :
. 3 alternate subtitle tracks (English, English with audio description and French)
[Link](https://sample.vodobox.com/planete_interdite/planete_interdite_alternate.m3u8)





## HLS Keys

### TARGETDURATION
### TARGET DURATION

This sets the playlist or the video processor that all the components `.mp4` or `.ts` or segments of audio/video/text are of specific secs. In this example the target segments are of `10 secs` each.

Expand All @@ -53,27 +50,36 @@ fileSequenceA.ts
fileSequenceB.ts
```

## Techniques
### CONTENT METADATA


### Switch Live to Event Record
Protocol `HLSTagDescriptor` and `HLSTagValueIdentifier`

When I think of an EVENT style playlist in streaming world, I think of DVR | Video Recordings. If a user is scrolling the Live Grid in video stream app and they want to record an episode, that playlist will go from `LIVE` -> `EVENT`. Best way to see this is to select a live program, hit Record, wait until the UI says the recording is set. Next, hit Watch and you'll see the `Live` HLS manifest file program is now `Event`
`HLSTagDescriptor` = EXT-X-XCAL-CONTENTMETADATA | the tag name
`HLSValueIdentifier` = KEYID | DRMAGNOSTIC | the attribute names in the tag

```ts
#EXT-X-XCAL-CONTENTMETADATA:KEYID="bd8e7d69-saw4-6a00-1eb9-637364ad6a4c",DRMAGNOSTIC="ZXlKNE5YUWpVekksa3r3XXzNFTnZrSFE="
```

## Techniques

### Switch Live to Event Record

When I think of an EVENT style playlist in streaming world, I think of DVR | Video Recordings. If a user is scrolling the Live Grid in video stream app and they want to record an episode, that playlist will go from `LIVE` -> `EVENT`. Best way to see this is to select a live program, hit Record, wait until the UI says the recording is set. Next, hit Watch and you'll see the `Live` HLS manifest file program is now `Event`

## Thumbnails

```ts
#EXT-NOM-I-FRAME-DISTANCE
```

## Advertising

```ts
#EXT-X-ADVERTISING:SYSCODE=231532523532377442
```


## DRM

```ts
Expand All @@ -82,7 +88,6 @@ KEYID="017ee539-UUID-string",
DRMAGNOSTIC="some_base_64_key_value"
```


## Apple Interstitials

[Getting Started With HLS Interstitials - apple developer](https://developer.apple.com/streaming/GettingStartedWithHLSInterstitials.pdf)
Expand Down
6 changes: 5 additions & 1 deletion ios/swift/switch.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ if case .caseOne(let msg) = event {
}
```

https://useyourloaf.com/blog/swift-if-case-let/
[use your loaf | swift-if-case-let](https://useyourloaf.com/blog/swift-if-case-let/)


[fucking if case let syntax](https://fuckingifcaseletsyntax.com/)


## Reference

Expand Down
5 changes: 5 additions & 0 deletions ios/swiftUI/Readme_swiftUI.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@

[view](view.md)



## References

[Fucking SwiftUI](https://fuckingswiftui.com/)
8 changes: 8 additions & 0 deletions ios/swiftUI/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ VStack {
[SO | detect taps on a List cell row in SwiftUI](https://stackoverflow.com/questions/68346592/how-to-detect-taps-on-a-list-cell-row-in-swiftui)


Use `contentShape` to get full tappable area option and you may also need to add `Spacer()` in between List Cell `HStack | VStack` component in order to get the whole cell from left / right accessory view to be tappable. Since by default SwiftUI isn't fully tappable on instances.

```swift
.contentShape(Rectangle())
```

[HWS | source](https://www.hackingwithswift.com/quick-start/swiftui/how-to-control-the-tappable-area-of-a-view-using-contentshape)

## References

[swiftui labs | impossible-grids](https://swiftui-lab.com/impossible-grids/)
Expand Down

0 comments on commit e4f38c2

Please sign in to comment.