/ Published in: JavaScript
                    
                                        Returns true if the given track is the Master Track.
Problem with this approach is that always a javascript error is triggered, even when surrounded by try/catch, but it works.
                Problem with this approach is that always a javascript error is triggered, even when surrounded by try/catch, but it works.
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
 // Returns true if the given track is the Master Track function isMasterTrack(track) { var api = new LiveAPI(); var path = track.path.split("\"")[1]; // remove quotes from path api.path = path + " mixer_device"; // post(api.type); // type is 'Track' for all normal tracks, Returns and MasterTrack so I try another way: var val = api.get("cue_volume"); // this parameter only exists when in the Master Track. if (typeof val == "object") { return true; } return false; // Problem with this approach is that always a javascript error is triggered, even when surrounded by try/catch, but it works. }
Comments
                    Subscribe to comments
                
                