Skip to content

Commit 5975bf7

Browse files
committed
Updates Issue Template
1 parent 9a28d04 commit 5975bf7

4 files changed

Lines changed: 256 additions & 159 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 103 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -16,43 +16,64 @@ A clear and concise description of what the bug is.
1616

1717
```groovy
1818
dependencies {
19-
implementation 'io.fastpix.data:media3:1.2.2'
19+
implementation("io.fastpix.upload:X.X.X")
2020
}
2121
```
2222

2323
2. **Code To Reproduce**
2424

2525
```kotlin
26-
val videoDataDetails = VideoDataDetails(
27-
videoId = UUID.randomUUID().toString(),
28-
videoTitle = "My Video"
29-
).apply {
30-
videoSeries = "Demo Series"
31-
videoProducer = "Demo Producer"
32-
videoContentType = "VOD"
33-
// ..etc
34-
}
35-
// Optional
36-
val playerDataDetails = PlayerDataDetails(
37-
playerName = "media3",
38-
playerVersion = "latest-version"
39-
)
40-
// Optional
41-
val customDataDetails = CustomDataDetails().apply {
42-
customField1 = "Custom Value 1"
43-
customField2 = "Custom Value 2"
44-
// ..etc
45-
}
46-
47-
fastPixDataSDK = FastPixBaseMedia3Player(
48-
context = this,
49-
playerView = binding.playerView,
50-
exoPlayer = exoPlayer,
51-
workSpaceId = "workspace-key",
52-
playerDataDetails = playerDataDetails,
53-
videoDataDetails = videoDataDetails,
54-
customDataDetails = customDataDetails
55-
)
26+
val sdk = FastPixUploadSdk.Builder(this)
27+
.setFile(file)
28+
.setSignedUrl(_signedUrl.orEmpty())
29+
.setChunkSize(16 * 1024 * 1024) // Chunk Size in Byte
30+
.setMaxRetries(3)
31+
.callback(new object : FastPixUploadCallbacks {
32+
override fun onProgressUpdate(progress: Double) {
33+
/* ... */
34+
}
35+
override fun onPauseUploading() {
36+
// Handle Pause State
37+
}
38+
override fun onResumeUploading() {
39+
// Handle Resume State
40+
}
41+
override fun onAbort() {
42+
// Handle Abort State
43+
}
44+
override fun onUploadInit() {
45+
// Handle Abort State
46+
}
47+
override fun onChunkHanlded(
48+
totalChunks: Int,
49+
fileSizeInBytes: Long,
50+
currentChunk: Int,
51+
currentChunkSizeInBytes: Long
52+
) {
53+
// Update the UI according chunk data
54+
}
55+
override fun onSuccess(timiMillis: Long) {
56+
// Time to complete the Upload Process
57+
}
58+
override fun onChunkUploadingFailed(
59+
failedChunkRetries: Int,
60+
chunkCount: Int,
61+
chunkSize: Int
62+
) {
63+
// Handle Chunk Upload Failure
64+
}
65+
override fun onError(error: String, timeMillis: Long) {
66+
// Handle error message
67+
}
68+
override fun onNetworkStateChanged(isOnline: Boolean) {
69+
// Handle Network Changes
70+
}
71+
72+
})
73+
.setRetryDelay(2000) // Retry Delay
74+
.build()
75+
// Starts the Uploading Process
76+
sdk.startUpload()
5677
```
5778

5879
3. **Expected Behavior**
@@ -79,37 +100,57 @@ fastPixDataSDK = FastPixBaseMedia3Player(
79100

80101
```kotlin
81102
// Please provide a minimal code sample that reproduces the issue
82-
private val fastPixDataSDK = FastPixDataSDK()
83-
val videoDataDetails = VideoDataDetails(
84-
videoId = UUID.randomUUID().toString(),
85-
videoTitle = "My Video"
86-
).apply {
87-
videoSeries = "Demo Series"
88-
videoProducer = "Demo Producer"
89-
videoContentType = "VOD"
90-
// ..etc
91-
}
92-
// Optional
93-
val playerDataDetails = PlayerDataDetails(
94-
playerName = "media3",
95-
playerVersion = "latest-version"
96-
)
97-
// Optional
98-
val customDataDetails = CustomDataDetails().apply {
99-
customField1 = "Custom Value 1"
100-
customField2 = "Custom Value 2"
101-
// ..etc
102-
}
103-
104-
fastPixDataSDK = FastPixBaseMedia3Player(
105-
context = this,
106-
playerView = binding.playerView,
107-
exoPlayer = exoPlayer,
108-
workSpaceId = "workspace-key",
109-
playerDataDetails = playerDataDetails,
110-
videoDataDetails = videoDataDetails,
111-
customDataDetails = customDataDetails
112-
)
103+
val sdk = FastPixUploadSdk.Builder(this)
104+
.setFile(file)
105+
.setSignedUrl(_signedUrl.orEmpty())
106+
.setChunkSize(16 * 1024 * 1024) // Chunk Size in Byte
107+
.setMaxRetries(3)
108+
.callback(new object : FastPixUploadCallbacks {
109+
override fun onProgressUpdate(progress: Double) {
110+
/* ... */
111+
}
112+
override fun onPauseUploading() {
113+
// Handle Pause State
114+
}
115+
override fun onResumeUploading() {
116+
// Handle Resume State
117+
}
118+
override fun onAbort() {
119+
// Handle Abort State
120+
}
121+
override fun onUploadInit() {
122+
// Handle Abort State
123+
}
124+
override fun onChunkHanlded(
125+
totalChunks: Int,
126+
fileSizeInBytes: Long,
127+
currentChunk: Int,
128+
currentChunkSizeInBytes: Long
129+
) {
130+
// Update the UI according chunk data
131+
}
132+
override fun onSuccess(timiMillis: Long) {
133+
// Time to complete the Upload Process
134+
}
135+
override fun onChunkUploadingFailed(
136+
failedChunkRetries: Int,
137+
chunkCount: Int,
138+
chunkSize: Int
139+
) {
140+
// Handle Chunk Upload Failure
141+
}
142+
override fun onError(error: String, timeMillis: Long) {
143+
// Handle error message
144+
}
145+
override fun onNetworkStateChanged(isOnline: Boolean) {
146+
// Handle Network Changes
147+
}
148+
149+
})
150+
.setRetryDelay(2000) // Retry Delay
151+
.build()
152+
// Starts the Uploading Process
153+
sdk.startUpload()
113154
```
114155

115156
## Logs/Stack Trace

.github/ISSUE_TEMPLATE/documentation_issue.md

Lines changed: 51 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -65,37 +65,57 @@ Thank you for helping improve the FastPix Node SDK documentation! Please provide
6565
Here's how the documentation should be written:
6666

6767
```kotlin
68-
private val fastPixDataSDK = FastPixDataSDK()
69-
val videoDataDetails = VideoDataDetails(
70-
videoId = UUID.randomUUID().toString(),
71-
videoTitle = "My Video"
72-
).apply {
73-
videoSeries = "Demo Series"
74-
videoProducer = "Demo Producer"
75-
videoContentType = "VOD"
76-
// ..etc
77-
}
78-
// Optional
79-
val playerDataDetails = PlayerDataDetails(
80-
playerName = "media3",
81-
playerVersion = "latest-version"
82-
)
83-
// Optional
84-
val customDataDetails = CustomDataDetails().apply {
85-
customField1 = "Custom Value 1"
86-
customField2 = "Custom Value 2"
87-
// ..etc
88-
}
89-
90-
fastPixDataSDK = FastPixBaseMedia3Player(
91-
context = this,
92-
playerView = binding.playerView,
93-
exoPlayer = exoPlayer,
94-
workSpaceId = "workspace-key",
95-
playerDataDetails = playerDataDetails,
96-
videoDataDetails = videoDataDetails,
97-
customDataDetails = customDataDetails
98-
)
68+
val sdk = FastPixUploadSdk.Builder(this)
69+
.setFile(file)
70+
.setSignedUrl(_signedUrl.orEmpty())
71+
.setChunkSize(16 * 1024 * 1024) // Chunk Size in Byte
72+
.setMaxRetries(3)
73+
.callback(new object : FastPixUploadCallbacks {
74+
override fun onProgressUpdate(progress: Double) {
75+
/* ... */
76+
}
77+
override fun onPauseUploading() {
78+
// Handle Pause State
79+
}
80+
override fun onResumeUploading() {
81+
// Handle Resume State
82+
}
83+
override fun onAbort() {
84+
// Handle Abort State
85+
}
86+
override fun onUploadInit() {
87+
// Handle Abort State
88+
}
89+
override fun onChunkHanlded(
90+
totalChunks: Int,
91+
fileSizeInBytes: Long,
92+
currentChunk: Int,
93+
currentChunkSizeInBytes: Long
94+
) {
95+
// Update the UI according chunk data
96+
}
97+
override fun onSuccess(timiMillis: Long) {
98+
// Time to complete the Upload Process
99+
}
100+
override fun onChunkUploadingFailed(
101+
failedChunkRetries: Int,
102+
chunkCount: Int,
103+
chunkSize: Int
104+
) {
105+
// Handle Chunk Upload Failure
106+
}
107+
override fun onError(error: String, timeMillis: Long) {
108+
// Handle error message
109+
}
110+
override fun onNetworkStateChanged(isOnline: Boolean) {
111+
// Handle Network Changes
112+
}
113+
114+
})
115+
.setRetryDelay(2000) // Retry Delay
116+
.build()
117+
// Starts the Uploading Process
118+
sdk.startUpload()
99119
```
100120

101121
## Additional Context

.github/ISSUE_TEMPLATE/question_support.md

Lines changed: 52 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ Thank you for reaching out! We're here to help you with the FastPix Resumable Up
2727
**What have you already attempted to solve this?**
2828

2929
```kotlin
30-
import io.fastpix.data.domain.model.CustomDataDetails
31-
import io.fastpix.data.domain.model.PlayerDataDetails
32-
import io.fastpix.data.domain.model.VideoDataDetails
33-
import io.fastpix.data.exo.FastPixBaseMedia3Player
30+
package io.fastpix.uploadsdk
3431

3532
// Your attempted code here
3633
```
@@ -50,37 +47,57 @@ import io.fastpix.data.exo.FastPixBaseMedia3Player
5047
## Configuration
5148
```kotlin
5249
// Your current SDK configuration (remove sensitive information)
53-
private val fastPixDataSDK = FastPixDataSDK()
54-
val videoDataDetails = VideoDataDetails(
55-
videoId = UUID.randomUUID().toString(),
56-
videoTitle = "My Video"
57-
).apply {
58-
videoSeries = "Demo Series"
59-
videoProducer = "Demo Producer"
60-
videoContentType = "VOD"
61-
// ..etc
62-
}
63-
// Optional
64-
val playerDataDetails = PlayerDataDetails(
65-
playerName = "media3",
66-
playerVersion = "latest-version"
67-
)
68-
// Optional
69-
val customDataDetails = CustomDataDetails().apply {
70-
customField1 = "Custom Value 1"
71-
customField2 = "Custom Value 2"
72-
// ..etc
73-
}
74-
75-
fastPixDataSDK = FastPixBaseMedia3Player(
76-
context = this,
77-
playerView = binding.playerView,
78-
exoPlayer = exoPlayer,
79-
workSpaceId = "workspace-key",
80-
playerDataDetails = playerDataDetails,
81-
videoDataDetails = videoDataDetails,
82-
customDataDetails = customDataDetails
83-
)
50+
val sdk = FastPixUploadSdk.Builder(this)
51+
.setFile(file)
52+
.setSignedUrl(_signedUrl.orEmpty())
53+
.setChunkSize(16 * 1024 * 1024) // Chunk Size in Byte
54+
.setMaxRetries(3)
55+
.callback(new object : FastPixUploadCallbacks {
56+
override fun onProgressUpdate(progress: Double) {
57+
/* ... */
58+
}
59+
override fun onPauseUploading() {
60+
// Handle Pause State
61+
}
62+
override fun onResumeUploading() {
63+
// Handle Resume State
64+
}
65+
override fun onAbort() {
66+
// Handle Abort State
67+
}
68+
override fun onUploadInit() {
69+
// Handle Abort State
70+
}
71+
override fun onChunkHanlded(
72+
totalChunks: Int,
73+
fileSizeInBytes: Long,
74+
currentChunk: Int,
75+
currentChunkSizeInBytes: Long
76+
) {
77+
// Update the UI according chunk data
78+
}
79+
override fun onSuccess(timiMillis: Long) {
80+
// Time to complete the Upload Process
81+
}
82+
override fun onChunkUploadingFailed(
83+
failedChunkRetries: Int,
84+
chunkCount: Int,
85+
chunkSize: Int
86+
) {
87+
// Handle Chunk Upload Failure
88+
}
89+
override fun onError(error: String, timeMillis: Long) {
90+
// Handle error message
91+
}
92+
override fun onNetworkStateChanged(isOnline: Boolean) {
93+
// Handle Network Changes
94+
}
95+
96+
})
97+
.setRetryDelay(2000) // Retry Delay
98+
.build()
99+
// Starts the Uploading Process
100+
sdk.startUpload()
84101
```
85102

86103
## Expected Outcome

0 commit comments

Comments
 (0)