File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
java/com/getstream/sdk/chat/view/activity Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 2121import com .getstream .sdk .chat .utils .Utils ;
2222import com .pierfrancescosoffritti .youtubeplayer .player .AbstractYouTubePlayerListener ;
2323import com .pierfrancescosoffritti .youtubeplayer .player .YouTubePlayer ;
24- import com .pierfrancescosoffritti .youtubeplayer .player .YouTubePlayerInitListener ;
2524import com .pierfrancescosoffritti .youtubeplayer .player .YouTubePlayerView ;
2625
2726import java .util .List ;
@@ -37,6 +36,7 @@ public class AttachmentActivity extends AppCompatActivity {
3736 ImageView iv_image ;
3837 ProgressBar progressBar ;
3938
39+ private final String YouTube = "YouTube" ;
4040
4141 int index ;
4242 List <Attachment > attachments ;
@@ -120,7 +120,11 @@ private void showAttachment(Attachment attachment) {
120120
121121 switch (type ) {
122122 case ModelType .attach_video :
123- playYoutube (url );
123+ if (attachment .getAuthor ().toLowerCase ().equals ("youtube" )){
124+ playYoutube (url );
125+ }else {
126+ loadUrlToWeb (attachment .getAssetURL ());
127+ }
124128 break ;
125129 case ModelType .attach_giphy :
126130 showGiphy (url );
Original file line number Diff line number Diff line change 2424 <string name =" title_file" >Select your file</string >
2525 <!-- Error-->
2626 <string name =" title_error" >Error!</string >
27-
28- <!-- TODO: Remove or change this placeholder text -->
29- <string name =" hello_blank_fragment" >Hello blank fragment</string >
3027</resources >
You can’t perform that action at this time.
0 commit comments