Johnnyrabbat
Member
Hello, 
I'm trying to play a UriSource with exoplayer but I need to set up the http header for the link.
I've found this java code (link)
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
Anyone can help me port it to B4A..
Thanks
			
			I'm trying to play a UriSource with exoplayer but I need to set up the http header for the link.
I've found this java code (link)
			
				Setting headers for streaming mp4 video and playing files with Exoplayer:
			
		
		
		   // (1) Create method returns  'DataSource.Factory'
     public DataSource.Factory headers() {
            Map<String, String> headersMap = new HashMap<>();
            headersMap.put("iid", "aaa123 ");
            headersMap.put("version", "1.4");
            headersMap.put("agent", "phone");
            headersMap.put("token", "dfdf4f4yt5yf5fh4f5");
            return new DefaultHttpDataSource.Factory().setDefaultRequestProperties(headersMap);
        }
    // (2) Add headers() method call to the player
           SimpleExoPlayer player = new SimpleExoPlayer.Builder(context)
                    .setMediaSourceFactory(new
                     DefaultMediaSourceFactory(headers()))
                    .build();Anyone can help me port it to B4A..
Thanks
 
				 
 
		 
 
		 
 
		 
 
		 
 
		